VBA stands for Visual Basic for Applications, an event-driven programming language from Microsoft. It is mostly used with Microsoft Office applications such as MSExcel, MS-Word, and MS-Access.
It assists techies in creating unique applications and solutions to improve such applications’ functionality. The benefit of this feature is that you DO NOT NEED to have Visual Basic installed on your computer; although, doing so will help you accomplish the goal.
With the number of built-in functions in Microsoft Excel, you may be wondering why you should use VBA in Excel. Only basic built-in functions are available in MS Excel, which may not be enough to carry out complex calculations. VBA becomes the most obvious answer in these situations.
Syntax:
Dim <<variable_name>> As <<variable_type>>
Text Here
Example
Sub MessageBox_Demo()
'Message Box with just prompt message MsgBox("Welcome")
'Message Box with title, yes no and cancel Butttons
a = MsgBox("Do you like blue color?",3,"Choose options")
‘ Let’s assume that you press No Button
MsgBox ("The Value of a is " & a)
End Sub