Automatically close file

  • Thread starter Thread starter sck352
  • Start date Start date
S

sck352

I have a vb script that currently opens another workbook to populate a
summary sheet, then closes that sheet. Currently i am using:
JournalWkbk.Close savechanges:=False
Which works fine except that if the user already had the workbook open
and made changes, it discards them. I want it to automatically save
the sheet. If i change it to:
JournalWkbk.Close savechanges:=True
It then brings up the "save as" dialog box. I want it to just save
over it. It tried to use:
Application.DisplayAlerts = False
JournalWkbk.Close savechanges:=True
Application.DisplayAlerts = True
But it still brings the box up. How can i make this work?

Thanks,
Sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top