An Excel VBA Addin is running the following code in a regular module, modifying another workbook which contains a sheet called "Master List".
Whether the code makes it to MsgBox "1" or not depends whether macros are enabled in the workbook (not the Addin (!)) If Macros are not enabled, it prints a "0" and then stops (with no error conditions) I know it's made a copy because I see "Master List (2)" as a sheet. But it does not print "1" (!) If Macros are enabled (either with a user permission, or perhaps the workbook is in a trusted folder) the code proceeds through MsgBox "1" and beyond. The sheet Master List does contain events code, if that helps. On the other hand I've turned events off. I've double checked the right workbook is referenced via Application.WorkBooks(1) (so that it's not referring to the AddIn, but rather the "ActiveWorkBook") What's going on???
Please Login or Register to view this content.