Is there an "OnOpen" event for Excel
If you want to display the message when a sheet is activated, put your
code in the Sheet Object Activate sub. i.e.
Private Sub Worksheet_Activate() ' Built in subroutine
MsgBox "hello"
End Sub
SteveM
Jurrasicway wrote:
Hi,
I wish to display a message box when a user opens the spreadsheet. How do I
make my message box code run? I have tried the following but it does not seem
to work:
Sub DisplayMessageBox()
If Sheet("Price Change Request").active = True Then
MsgBox "hello"
End if
End Sub
How do I trigger this sub routine or is there an "OnOpen" event that I can
attach my code to?
Graeme.
|