PC Review


Reply
Thread Tools Rate Thread

Automatically close file

 
 
sck352@gmail.com
Guest
Posts: n/a
 
      7th Dec 2007
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
 
Reply With Quote
 
 
 
 
Dan R.
Guest
Posts: n/a
 
      7th Dec 2007
JournalWkbk.Save

--
Dan

On Dec 7, 10:16 am, sck...@gmail.com 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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I automatically close a file after using a hyperlink? RJH Microsoft Word Document Management 0 18th Dec 2008 07:59 PM
File/Close automatically saving changes without prompt Joe@SAA Microsoft Excel Misc 0 23rd Jun 2008 10:31 PM
Copy from another file and close automatically =?Utf-8?B?SmltIEc=?= Microsoft Excel Misc 2 17th Oct 2007 01:31 AM
Close file automatically =?Utf-8?B?TGVl?= Microsoft Excel Programming 2 1st Nov 2005 10:08 PM
VBA code to automatically close file Kevin Microsoft Excel Programming 4 6th Nov 2003 04:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:05 AM.