View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dan R. Dan R. is offline
external usenet poster
 
Posts: 220
Default Automatically close file

JournalWkbk.Save

--
Dan

On Dec 7, 10:16 am, wrote:
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