Not sure how well I can articulate this, but I'll give it a shot - I am fairly new to VBA and self-taught, so I know there are things I'm doing wrong!

The workbook in question is a large form (I inherited the project halfway through). It needs macros enabled; folks using it can't seem to remember to do that. I found code online that basically hides all but one "macro warning" sheet at closing, and then unhides the rest and hides the warning sheet at opening if macros are enabled. Edited it a little bit to suit specifically what I needed, and it works well.

The problem is that the form needs to be posted on the company's intranet, so employees can open a copy whenever they want to use it (then save to their own computers). When I open the file on the intranet and then go to close it, it gives me a save-as prompt (normal for anything opened on the intranet). If I say "yes" and save a copy to my computer, the original file doesn't appear to close and I am asked again if I want to save before closing - this time it is asking specifically about the copy I just saved, which doesn't appear to be open but apparently is.

I'm not sure why the second save-before-closing request is generated; it's clearly the one in the BeforeClose macro (tested by changing its text in the macro). However, since that file was just saved, I don't see how it makes it past the IF statement.

The code in question:

Please Login or Register  to view this content.

Thanks for any suggestions! I have tried dozens of things, and apparently they are all wrong...