I have a '.xlsm' file that is digitally signed (by me) so that it opens with macros enabled automatically, with prompting. In the Workbook_Open event of this file is a date check that compares today's date against a set expiration date (). If the expiration date has passed, the user is no longer allowed to open the file. This is done to force an upgrade of the file at the start of each year. The problem I'm having is that to upgrade the file, I have to open it from a macro in another file using VBA, transfer the old data to the new file, and then close the old file again. When I open the old file using VBA, the Workbook_Open event is fired, and the file closes itself again!
Change macro security settings in Excel - Macro security settings and their effects Disable all macros without notification Click this option if you don't trust macros. Disable all macros with notification This is the default setting. Disable all macros except digitally signed macros This setting. Disable macro in open workbook. If it is not open, you will just have the yellow security bar (2007 and later). You can edit your trusted locations in File > Options > Trust Center > Trust Center Settings > Trusted Locations The only way to disable macros after enabling them is to restart Excel.
Is there a way to open a workbook in VBA with macros disabled? This would allow me to access the data in the old Excel file (I don't need to access the old VBA modules).
Thanks, Eric.