Lesson#71: Add a button to the worksheet and show a message box on click

Lesson#71: Add a button to the worksheet and show a message box on click
Now you will know how to add a button to the worksheet and show a message box on click.

1. Go to Developer Tab.
2. Click on Insert.
3. Select Button (Form Control).

4. Put the button on the worksheet by dragging and putting it on the sheet.

5. Immediately Macro name window will appear.

6. Click on New.

7. There you have to put this Code.

Sub Button2_Click()
MsgBox (“Your Message”)
End Sub

8. Click on Run Sub/ UserForm.

9. Click on the Run in the Macros window.

Your Message box will be visible like it has shown in the picture left.

See also  Lesson#180: How do you copy a color from one cell to another?

Hi! I am Puspendu. I am the founder and author of Excelabcd. I am little creative person, blogger and Excel-maniac guy. I hope you enjoy my blog.

Leave a Reply

Your email address will not be published. Required fields are marked *

*