How to write macro in Excel

Please  follow below steps to write Macro.

Step 1: Create a new Excel Application
Step 2: Press Alt + F11,it will open code behind window.


Step 3: By right clicking -ThisWorkbook- select Insert -> Module


Step 4: Write Hello world Program.

Sub Helloworld()
MsgBox "Hello World!!!"
End Sub

Step 5: Press F5.Msgbox will shown as   "Hello World!!!"




No comments: