Day 5 VBA Hero – Hello world!


Hello world is really the first thing that most programming books teach people to do.

It empowers everybody so that they do what they are trying to do.

Getting a computer to do something you want.

The first time is quite exciting if you have never done it elsewhere.

Today, we will create a message box with the words Hello World!

A message box is a pop-up box with a custom text in it.

You can write anything you need in it.

Today the message will be “Hello World”.

Sub LetsGetStarted()

MsgBox ("Hello World!")

End Sub

That will give you a pop-up box, that says Hello World!. (Image 1)

Your homework after this lesson, because yes, there will be homework:

Create a message box. The input text will be from a string variable named strHello.

The variable will have the text “Hello world?”

To run the code, click anywhere in it with your mouse and then click the play macro button. (image 2)

Verified by MonsterInsights