Hi Bill
Basically all you need to do is trick Excel into thinking the workbooks are already saved. It depends on how you are referencing your Workbooks, but one of the codes below should suit.
Sub TryOneofThese()
ActiveWorkbook.Saved = True
ThisWorkbook.Saved = True
Workbooks(StringVariable).Saved = True
Workbooks(1).Saved = True
End Sub
Dave
OzGrid Business Applications
Just turn off all alerts while the macro is running
All you have to do is put this code at the begging of you macro:
application.displayalerts=false
This will turn off all the alerts like "do you want to save" while the macro is running.
Hope this helps.
Jacob
Re: Just turn off all alerts while the macro is running
application.displayalerts=false This will turn off all the alerts like "do you want to save" while the macro is running. Hope this helps. Jacob
Jacob, I'm assuming that Bill doesn't want to save the Workbooks as he is only taking data from them and not putting data in.
But yes, if Bill does want to save each workbook, then DisplayAlerts=False will cause a save without asking.
Dave
OzGrid Business Applications
Oops , I have that back to front :o)
OzGrid Business Applications