VBA allows us to:
· Automate repetitive tasks Ex. Creating daily charts
· Enforce standards on tasks Ex. Making sure journal entries balance before posting
· Simplify complex tasks Ex. Creating user defined functions to replace long, convoluted formulas
· Perform tasks that would be otherwise impossible Ex. Posting data to external databases
What is VBA?
VBA stands for Visual Basic for Applications. VBA is known as the Macro language for Microsofts (and others)
Office applications (aka Host Applications). Even though VBA is found in many different applications (Excel, Outlook, Access, Word, Visio, and others), the things that make up this computer language such as Functions, Variable Types, Operators, and Branching and Looping are the same in all of them:
Just like Excel, VBA has a rich functions library. Some are exclusive to VBA. Many are
similar to Excel. For example, Excels Absolute Value function is ABS(). So is VBAs. Variable Types
Variables are like Excels cells they hold values that can be read or changed. Unlike
Excels cells, variables must be of certain types that determine what the variable can
hold. Two common variable types are:
Integer Holds small whole numbers for use in math operations
String Holds anything you can type but wont use in math operations.
Branching and Looping
This differentiates Excel from a procedural language like VBA. Branching and looping
are why VBA is a strong complement to Excel. The procedural elements of VBA are: If/Then/Else Statements
Used to conditionally run specific sections of VBA code Select Case statements Similar to If/Then/Else, Select Case statements run specific sections of VBA code based on an a single expression that can have multiple values.
As you can see, VBA is similar is some respects to Excel, so leaning VBA isnt that difficult for Excels users. And once youve leaned VBA, you can use it to add automation to many different applications without having to learn different languages.
I have an Excel workbook used for tracking our daily sales. Some of the other features are comparing sales figures to budget, tracking individual sales, analyzing statistical data and charts and graphs. There are also a number of userforms... [Read More]
Hi all, I have a problem that is math orientated and Google is not answering my query about transposing exponents. I have a linear set of equations and I'm trying to isolate t in the equation t^4 = (3.25*10-5)k^-1. Does t = the fourth root of... [Read More]