The 64 bit operating system really has nothing to do with VBA, the issue is which version of Office you are using.
I believe Martin's changes should resolve the issue. What is strange is that MS decided to use a variable named Win64 rather than Off64 to determine which version of Office you are running.
It's normal in those conditional compile sections for one section (the one that doesn't apply hopefully) to show up in red. That won't be a problem though since those lines will never be compiled or executed due to the conditional compile directives.
Are you running this code in a 64-bit Office installation?
Just compile your code...its normal for dual bitness declarations..I can only speak to 32-bit environments and there that's not true.
I agree with John that the declarations which are not valid for your current environment will normally display as red, but as John said, those lines should not be compiled if you are using the correct conditional compilation tests (thus Win64 OR VBA7) that Martin mentioned.
Private WithEvents mcTree As clsTreeView
#If Win64 Or VB7 Then
Private Declare PtrSafe Function LockWindowUpdate Lib "user32" (ByVal hWndLock As LongPtr) As Long
#Else
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwnd As Long) As Long
#End If
#If VBA7 Then
I use
#If Win64 Or VB7 Then