Launch MsgBox upon opening a specific sheet?

doug1022

New Member
Joined
Nov 21, 2005
Messages
5
Hello,

I am new to the world of vba and was hoping an experienced user could help me out with what is likely a simple question.

How do I initiate a message box ("Please update earnings consensus") each time a specific worksheet within a file is selected?

If I am working on this file all day, I want to be reminded each time I select this worksheet. Any ideas?

Many Thanks
Doug
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,362
Office Version
365
Platform
Windows
Try this.

To put the code in right click on the worksheet tab and select View Code.
Code:
Private Sub Worksheet_Activate()
    MsgBox "Please update earnings consensus"
End Sub
 

doug1022

New Member
Joined
Nov 21, 2005
Messages
5
Thanks very much for the quick reply.

This works perfectly.

I appreciate the help!
 

Forum statistics

Threads
1,082,480
Messages
5,365,801
Members
400,854
Latest member
zenith_11

Some videos you may like

This Week's Hot Topics

Top