The following:
#If False Then
Public Type Long
LoPart As Integer
HiPart As Integer
End Type
#End If
Throws a compiler error "Expected: Identifier" when run on my VBA7 32-bit office (Excel). This is because Long
is a protected type. However, it was my understanding that the compiler should not see what's in the block (since the condition is always false).
Why do I still get the error?
I can still write and run code using Long variables - my type doesn't show up in intellisense. But the line
Public Type Long
remains red in the editor indicating some problem. Is it something to worry about?
NB, I'm trying to write a replacement for LongPtr for pre VBA7 systems where it didn't exist - in the off-chance that someone manages to run VBA6 in 64 bit office - I bet there's a way...