Introduction :
In this post, I will show you how
to create your first macro (VBA program).
Objective :
To create a Macro which will show a Message Box "HELLO WORLD" (world classic "Hello World!" example J)
To write your 1st program and enter into world of VBA, follow the below steps
Steps :
1. Open Excel, and press Alt+F11 (this will open a new window Visual Basic Editor)
2. Click on INSERT >> MODULE
2. Click on INSERT >> MODULE
3. Then in the right side window type the below Code
Sub MyFirstMacro()
Msgbox "Hello World"
End Sub
You will see a message box saying "Hello World". You can type whatever you want to see in the message box
we should save the file in .xlsm or .xlsb file extension, so that we can run the macro later
we should save the file in .xlsm or .xlsb file extension, so that we can run the macro later
!********************* Try it out J ***************************!
No comments:
Post a Comment