Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
RLY RLY is offline
external usenet poster
 
Posts: 7
Default "Do You Want to Save Changes" message window

I'm ending a simple data transfer macro with:

Windows(DwnldName).Activate
Application.CutCopyMode = False
ActiveWindow.Close

However, I still receive that "Do you want to save changes" message window
before the system will close the "source" spreadsheet. Can I add some code to
bypass this step & force the source to close w/o saving?

Thanks, Robert

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default "Do You Want to Save Changes" message window

hi
at the beginning of your code add..
application.displayalerts = false
then at the end of your code, be sure to turn alerts back on.....
application.displayalerts = true

Regards
FSt1

"RLY" wrote:

I'm ending a simple data transfer macro with:

Windows(DwnldName).Activate
Application.CutCopyMode = False
ActiveWindow.Close

However, I still receive that "Do you want to save changes" message window
before the system will close the "source" spreadsheet. Can I add some code to
bypass this step & force the source to close w/o saving?

Thanks, Robert

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default "Do You Want to Save Changes" message window

I'd drop the use of the windows collection and use something like:

Workbooks(dwnldname).close savechanges:=false

Where dwnldname is a variable that includes the extension, right?

RLY wrote:

I'm ending a simple data transfer macro with:

Windows(DwnldName).Activate
Application.CutCopyMode = False
ActiveWindow.Close

However, I still receive that "Do you want to save changes" message window
before the system will close the "source" spreadsheet. Can I add some code to
bypass this step & force the source to close w/o saving?

Thanks, Robert


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default "Do You Want to Save Changes" message window

Leave it either way to the user whether or not to save:

Application.DisplayAlerts = False
ActiveWindow.Close
Application.DisplayAlerts = True


OR
ActiveWindow.Close SaveChanges:=False'does not save changes

OR
ActiveWindow.Close SaveChanges:=True ' save changes



--
Steve

"RLY" wrote in message
...
I'm ending a simple data transfer macro with:

Windows(DwnldName).Activate
Application.CutCopyMode = False
ActiveWindow.Close

However, I still receive that "Do you want to save changes" message window
before the system will close the "source" spreadsheet. Can I add some code
to
bypass this step & force the source to close w/o saving?

Thanks, Robert

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
"PLEASE WAIT" Window Message Maperalia Excel Programming 6 January 20th 09 12:59 AM
Creating a new shortcut in "Save As" window E.T.F. Excel Discussion (Misc queries) 2 April 18th 08 03:46 PM
"Save" and "Save As" options greyed out - "Save as Webpage" option Bill Excel Discussion (Misc queries) 0 January 16th 07 04:47 PM
How to prevent "Changed ... Save?" Message after disabling Shape? Joe HM Excel Programming 5 August 4th 06 04:28 PM
Message Window to tell user "Macro Running" keyt Excel Programming 2 October 4th 03 05:28 PM


All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"