View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_7_] Peter T[_7_] is offline
external usenet poster
 
Posts: 162
Default Weird Behaviour of Compiler Directives?


"GS" wrote in message

Peter,
Thanks for clarifying this. I don't use this much and so the problem
wasn't as apparent to me as it should have been since I've never seen...

#If CONST_NAME =...

..in any I have used. Clearly this construct implies a Boolean but it just
didn't 'register' about specifying a value. Just goes to show once again
how unfamiliarity can be more of a problem than code syntax! That's
probably why I adopted a more-easy-to-manage methodology. IMO, the 'dummy
file' approach works best because it doesn't require user-edit of code


I guess there are many different ways depending on what's most suitable, eg
username, click a button on the sheet to say who/where you are and set
internal flags accordingly, etc. The conditional constant might also be
easiest in some scenarios.

(which isn't possible since all my apps block access to the VBE + there
projects are "Not viewable" anyway).


It'd be nice if that could really be made secure!

In passing these built-in conditional constants work in the same way under
#If
Mac, Win32, VBA6, VBA7, Win64

Regards,
Peter T