View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Curious[_6_] Curious[_6_] is offline
external usenet poster
 
Posts: 22
Default Toggle between True and False confuses me

I want to see the msgbox only once when I first activate the sheet. I
do not want to be bothered again and again. But the msgbox keeps
popping up every time I go to the sheet.. What is wrong with the
following two codes?

Option Explicit
Dim ABC
Sub Workbook_Open()
ABC = False
End Sub

Sub Worksheet_Activate()
If IsNull(ABC) Then
ABC = False
End If
If ABC = False Then
MsgBox "Please pay attention to this formula."
ABC = True
End If
End Sub

Thanks in advance

H.Z.