MsgBox is an instruction which you can use to give some message, warning,error or to inform macro is executed successfully. It is a simple instruction. Place a command button on your worksheet and add the following code.
Program:
MsgBox "My First Excel VBA Program"
Output:
Program:
MsgBox "My First Excel VBA Program"
Output: