I'm confused. I thought that the sub was exiting when bblockevents=false, as
below (noted with asterisk). Otherwise, why wouldn't the sub end before the
msgbox?
Public bBlockEvents
Private Sub ToggleButton1_Click()
If bBlockEvents Then Exit Sub
bBlockEvents = True
MsgBox ToggleButton1.Value
With ToggleButton1
.Caption = "Protect Sheets"
.Value = False
End With
* bBlockEvents = False
End Sub
"Bob Phillips" wrote:
This is because bBlockEvents is a boolean (True/False) variable, and this is
the same as saying
If bBlockEvents = True Then Exit Sub
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Nicole B" wrote in message
...
I was wondering... how does your statement:
If bBlockEvents Then Exit Sub
work? is VB assuming some kind of value?