View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default A msgbox appears on sheet level once, and only once

Same basic idea as Snake, but I would declare a Boolean (true/false) variable
in the code module for the sheet in question, and I would use the
Worksheet_Activate event rather than Worksheet_SelectionChange.

Dim BeenHere As Boolean

Private Sub Worksheet_Activate()
If IsNull(BeenHere) Then
BeenHere = False
End If
If BeenHere = False Then
MsgBox "First time"
BeenHere = True
End If
End Sub

Hope this helps,

Hutch

"Snake Plissken" wrote:

add a variable on modul level then
in workbooks open event set its value that would store info about msgbox
appearence (e.g. string variable set to "N") - after selection you will
check wheather this value is set to "N" - if so the msg appear and the value
of that variable would be changed to "Y"