ltdanp22
asked on
On/Off switch for VBA code
Simple question for everyone...
In C++, I used to use #define to switch code on and off as follows:
#define DUMMY
#ifdef DUMMY
some code here...
#endif
If I commented out "#define DUMMY", the compiler would ignore all the code between #ifdef and #endif.
Is there anything in VBA that I can use to switch code blocks on and off like this?
Dan
In C++, I used to use #define to switch code on and off as follows:
#define DUMMY
#ifdef DUMMY
some code here...
#endif
If I commented out "#define DUMMY", the compiler would ignore all the code between #ifdef and #endif.
Is there anything in VBA that I can use to switch code blocks on and off like this?
Dan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's a conditional compilation prefix statement used in VB which should work in VBA. #Define in VB = Const but for conditional compilation use #Const.
ASKER