CokeOrCrack
Board Regular
- Joined
- Dec 13, 2015
- Messages
- 81
Hello:
My workbook has 2 sheets, "Numbers" and "General".
I have an If statement that runs at workbook close.
When BA2 in sheet "Numbers" is 0, BA3 shows "Correct".
The issue is that I have a Worksheet_Change sub in the "General" sheet. This sub updates a timestamp in that sheet when it is in any way changed.
After running the If statement at workbook close, the timestamp is still updating, even when BA2 = 0.
I have tried removing the above If statement, and the timestamp does not update at close without it, which confirms that the above If statement is what is causing the timestamp to update.
Question:
Is there a way to end an If statement once it is true, but continue to evaluate if it is initially false?
Thanks
OJ
My workbook has 2 sheets, "Numbers" and "General".
I have an If statement that runs at workbook close.
Code:
If Sheets("Numbers").Range("BA2") = 0 Then Sheets("Numbers").Range("BA3") = "Correct"
ElseIf Sheets("Numbers").Range("BA2") <> 0 Then
Sheets("General").Range("A13").ClearContents
End If
When BA2 in sheet "Numbers" is 0, BA3 shows "Correct".
The issue is that I have a Worksheet_Change sub in the "General" sheet. This sub updates a timestamp in that sheet when it is in any way changed.
After running the If statement at workbook close, the timestamp is still updating, even when BA2 = 0.
I have tried removing the above If statement, and the timestamp does not update at close without it, which confirms that the above If statement is what is causing the timestamp to update.
Question:
Is there a way to end an If statement once it is true, but continue to evaluate if it is initially false?
Thanks
OJ