Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"PLEASE WAIT" Window Message | Excel Programming | |||
Creating a new shortcut in "Save As" window | Excel Discussion (Misc queries) | |||
"Save" and "Save As" options greyed out - "Save as Webpage" option | Excel Discussion (Misc queries) | |||
How to prevent "Changed ... Save?" Message after disabling Shape? | Excel Programming | |||
Message Window to tell user "Macro Running" | Excel Programming |