tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,924
- Office Version
- 365
- 2019
- Platform
- Windows
Why is it this does not compile?
It is as if it ignores the If condition and declares b regardless, so you cannot declare it "twice".
Thanks
It is as if it ignores the If condition and declares b regardless, so you cannot declare it "twice".
Code:
Dim a As Long
If a = 10 Then
Dim b As String
Else
Dim b As Long
End If
Thanks