mortgageman
Well-known Member
- Joined
- Jun 30, 2005
- Messages
- 2,015
In the following code, the test fails, because, once bTest is declared as a Boolean, it becomes equal to FALSE (I checked this after much head scratching). How does one assign a value to a boolean variable only after you make your test?
Code:
Sub foo()
Dim bTest As Boolean
If Range("a20").Value = False Then bTest = False ' <= a20 is kept empty
MsgBox bTest
End Sub