I have this example very easy to reproduce:
A macro which has a userform with only one button on it "Close Active Document" which only has the code
If I open multiple documents let's say 5 and launch the macro, it will close the first active document when button pressed, stays on, it will close the second active document when button pressed and than closes itself. Which one is abnormal, the fact it stays open after the first document closes or the fact it closes after running the code the second time?Code:ActiveDocument.Close (False)
And how can I make it to stay on at all times, so I can close all 5 files one by one?
Thanks in advance for any answers.




Reply With Quote