Hello guys,
I have this code inserted in a macro in workbook1:
When I do run this, it opens the workbook , runs the macro, but the it goes onto reopening the workbook again, giving me a message asking if I am sure I want to reopen workbook2...
If I only put this:
... without the macro that runs from that workbook2, then it opens, saves and closes without a problem. There's nothing wrong with the macro, as it runs well if I directly run it from workbook2. Any thoughts on what might be the problem?
Thanks in advance.
I have this code inserted in a macro in workbook1:
Code:
Workbooks.Open ("C:\workbook2.xlsm")
INSERT_CAFETARIA
Workbooks("workbook2.xlsm").Close savechanges:=True
When I do run this, it opens the workbook , runs the macro, but the it goes onto reopening the workbook again, giving me a message asking if I am sure I want to reopen workbook2...
If I only put this:
Code:
Workbooks.Open ("C:\workbook2.xlsm")
Workbooks("workbook2.xlsm").Close savechanges:=True
... without the macro that runs from that workbook2, then it opens, saves and closes without a problem. There's nothing wrong with the macro, as it runs well if I directly run it from workbook2. Any thoughts on what might be the problem?
Thanks in advance.