Shred Dude
04-26-2011, 01:16 PM
Does anyone know a way to check for conditional compilation settings on a closed file?
I often use a conditional compilation setting on projects to toggle between debug mode and release mode with something like:
conDEBUG=1
in the Properties of a VBA Project. This will establish a constant value in my code at run-time that then effects the behavior of error handling.
Inevitably, in my haste to send an enhancement version to someone, I'll email them a file with that setting still set to 1 (true) instead of 0. This can end up promoting undesired behavior on their end in the event the workbook hits an error.
I took a look through the object browser and didn't find a way to read those values from a project. maybe there's an API...?
And often times I'll have the project password protected too.
I'm just exploring whether I can write a routine to check .xlsm & .xlam file attachments before getting sent through Outlook for the value of the various conditional compilation settings. At a minimum I guess I could just pop up a msgbox when such a file type is attached to ask myself if I've verified the settings before sending. I'm just curious if there'd be a way to automate that.
Any ideas???
Thanks,
Shred
I often use a conditional compilation setting on projects to toggle between debug mode and release mode with something like:
conDEBUG=1
in the Properties of a VBA Project. This will establish a constant value in my code at run-time that then effects the behavior of error handling.
Inevitably, in my haste to send an enhancement version to someone, I'll email them a file with that setting still set to 1 (true) instead of 0. This can end up promoting undesired behavior on their end in the event the workbook hits an error.
I took a look through the object browser and didn't find a way to read those values from a project. maybe there's an API...?
And often times I'll have the project password protected too.
I'm just exploring whether I can write a routine to check .xlsm & .xlam file attachments before getting sent through Outlook for the value of the various conditional compilation settings. At a minimum I guess I could just pop up a msgbox when such a file type is attached to ask myself if I've verified the settings before sending. I'm just curious if there'd be a way to automate that.
Any ideas???
Thanks,
Shred