Example
- Open the Visual Basic Editor ( see Opening the Visual Basic Editor )
- Click Insert --> Module to add a new Module :
- Copy and Paste the following code in the new module :
Sub hello()
MsgBox "Hello World !"
End Sub
To obtain :
-
Click on the green “play” arrow (or press F5) in the Visual Basic toolbar to run the program:
-
Select the new created sub "hello" and click Run
:
-
Done, your should see the following window: