Quote Originally Posted by BlueCactus
This is a strange thing that I'm struggling to get a grip with. Right now I have one particular Excel file where the code:
[vba]Sub Test()
#If Mac Then
MsgBox "Mac"
#Else
MsgBox "Win"
#End If
End Sub[/vba]
gives "Win" on my Mac. My other files correctly respond "Mac"
go into the Object Broswer on the Mac and see if the Mac constant is defined for that verion of Office.

My recollection is that the Mac constant was not in all versions of Office on windoze. Do not know about the Mac, I prefer to eat Oranges.

As far as Chart.Export and LoadPicture() in userform code go, I can make them fly under Mac VBA's radar by
1. placing them in a separate Sub within the userform.
2. calling that Sub using
[vba]if Instr(Application.OperatingSystem, "Win") then call WinCode[/vba]

But I agree that it is probably good practice to place them in a separate module. Just haven't tested that approach among all the other havoc I'm experiencing.
Using a separate module is the proper way to do this. My recollection is that I encountered cases where using a separate sub was insufficient protection.