Basic Excel VBA Msgbox


In this post I will show you how to make a basic vba msgbox.

The msgbox basically is used to display a message to the user.

Just add a button to your worksheet:

Click the “Developer” tab
Click the “Insert” button
Add a button

…then you can add this code to the button’s click event:

Sub Button1_Click()
    MsgBox "You clicked the button.", vbInformation, "Application Message"
End Sub

Let me know if you have any questions

[simple_contact_form]