VBA Excel Macros

Posted by akuinet

Excel VBA Macros

In this chapter let us understand how to write a simple macro. Let us take it step by step.
Step 1. First let us enable 'Developer' menu in Excel 20XX. To do the same, click on File >> Options.
Step 2. Click Customize Ribbon Tab and check 'Developer' and click 'OK'.
Developer in VBScript Step 3. The 'Developer' ribbon appears in menu bar.
Developer in VBScript Step 4. click 'Visual Basic' Button to open VBA Editor.
Developer in VBScript Step 5. Now Let us start scripting by adding a button. Click 'Insert' >> Select 'button'.
Developer in VBScript Step 6. Perform a Right Click and choose 'properties'.
Developer in VBScript Step 7. Edit the name and Caption as shown below.
Developer in VBScript Step 8. Now Double click the button, the sub procedure outline would be displayed as shown below.
Developer in VBScript Step 9. Let us start coding by simply adding a message.
Private Sub say_helloworld_Click()
    MsgBox "Hi"
End Sub
Step 10. Now you can click the button to execute the sub-procedure. The Output of the sub-procedure is shown below. We will demostrate further chapters using a simple button as explained from step#1 to 10. Hence It is important to understand this chapter thoroughly.



Developer in VBScript by http://www.tutorialspoint.com

Related Post



Post a Comment