Dude
two possible ways
One in the sheet module
Option Explicit
Private m_MsgBoxCancelled As Boolean
Private Sub ValueStore()
m_MsgBoxCancelled = True
End Sub
Sub testp()
If LenB(Range("B11").Value) > 0 And Not m_MsgBoxCancelled Then
Call ValueStore
MsgBox "This works once"
End If
End Sub
or use a cell B11 to store a value
Sub testered()
If LenB(Range("B11").Value) > 0 And Range("B11").Value = 0 Then
Range("B11").Value = 1
MsgBox "This works once"
End If
End Sub
you can reset the B11 to 0 when you open the workbook