Skip to main content

How to create/record a Macro

Step to Create a Basic Macro:

1)open up a new book, bring up the Developer tab (If you don't have the Developer tab, you can go to File, Options, Customize Ribbon and makes sure that the Developer tab is selected.)

2)open VBE editor (Developer -> Visual Basic or ShortcutKey: ALT+F11)

3)Add Module (Insert -> Module, Module is nothing but a workspace to writer our code)

4)Write/copy below code in Module workspace and click on RUN(F5)/PLAY option

Sub MyFirstMacro()

MsgBox "Welcome to MYTECHIE EXPERT BLOG"

End Sub

5)You'll get "Welcome to MYTECHIE EXPERT BLOG" output in message box

Comments