top of page

VBA CODE: Hello World! | Microsoft Excel

"Hello World!" - Writing Your First VBA Code in Microsoft Excel.

Below steps to be followed in Excel:

Step 1: Open the VBA Editor (Excel Shortcut Alt + F11) or go to the 'Develop' tab and select 'Visual Basic'.

Note: Developer Tab is hidden by default and should be enabled by user from the "Customize the Ribbon" window - Enable Developer Tab in Excel

Step 2: Select ‘Module’ from the Insert Menu or right click and insert 'Module'.

Step 3: Paste the below VBA code in the selected Module.

Step 4: Now run your macro by pressing ‘F5’ or clicking the play icon from the toolbar.

VBA Code:

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

Disclaimer: We, in our example, only cover how to perform such functions in excel and less focusing on the type of example we take. Our motive is to deliver the exact solution to the queries on "How To" in the most simplest way. Of course, the application of these function can be seen in our advanced modules with more complex examples and datasets.


Feel free to share your views and ask for models in the #comment section. If you like our content, please hit a #like button.

70 views0 comments


bottom of page