What is VBA?
Microsoft Excel VBA Tutorial
For example, the computer code below, called a Sub procedure, reads the Data worksheet in Microsoft Excel and if it finds A in column A on that sheet, it copies and pastes that row to the Output worksheet. You write these procedures in the Visual Basic Editor in what are called modules which can be viewed by pressing Alt+F11 in Microsoft Excel.
Excel VBA Code
VBA code is stored in the file type it was created in. For example, if you type VBA code while you are in Excel, it is stored in a workbook file. If it was typed in Word, then it will be stored in a document and so on. When you are typing the code in a module in the VBA Editor that is when you decide what file to put it in if you have multiple files open at once. You always need both the program and the file on the users computer if they want to run the VBA code you typed. The file has to be open in the program in order to run its code.
Microsoft Visual Basic for Applications (VBA) can be used in conjunction with Microsoft Excel to construct automated tools. Using VBA with Excel, powerful analysis tools can be developed quickly and with minimum cost. VBA can be used for important tasks like data processing, model analysis, automating Excel's features and chores, chart creation, report generation, dashboard creation, controlling other programs, communicating with databases, the list is endless.
Beyond just simple programs, Microsoft Excel and VBA can also be used to construct complex dashboard driven analysis and data processing tools that rival any program on the market today. We can say this because we develop complex integration systems for our customers using Excel and VBA after they have tried other various means and failed. These tools can go far beyond simple macros becoming actual programs. Excel has a vast array of automated features like drawing shapes, ActiveX controls, worksheets, userforms and cell ranges that when combined together with VBA allow these sophisticated dashboard driven programs to come alive. When you tie other programs and computer languages to Excel through VBA like Word, PowerPoint, Access, SQL Server, C and VB .Net, Excel VBA can tap into these environments obtaining the functionality it does not have. If you were using VBA in another Office product like PowerPoint, then this thinking process also applies.