Automatic Pop-up Message
You cannot "open" a worksheet.
Do you mean "activate" or "select" a worksheet?
Right-click on the sheet tab and "View Code"
Paste this into that module. Note: no error-checking included.
Private Sub Worksheet_Activate()
reqno = InputBox("Enter a Requisition Number")
ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
Range("U10") = reqno
ActiveSheet.Protect Password:="password"
End Sub
Gord Dibben MS Excel MVP
On Mon, 12 Jan 2009 11:51:01 -0800, patsy
wrote:
I need to know how to create a pop-up message when a worksheet is opened. I
need it to say "PUT IN REQ # AND DATE NEEDED NOW". I already have the
following VBA Code to add the current date:
ActiveSheet.Unprotect
Range("T10") = Now()
ActiveSheet.Protect
ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
ActiveSheet.Protect Password:="password"
What code and where does it go to add the pop-up box?
I would appreciate any help possible.
Thanks.
|