Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have
Application.DisplayAlerts = False Application.EnableEvents = False wb.SaveAs strFName Application.EnableEvents = True Application.DisplayAlerts = True DisplayAlerts suppresses the message that I'm overwriting a file, but will not keep the SaveAs dialog box from popping up. I'm using XL2000, SP-3. Any suggestions? Do I have to work through the DIalogs collection and kill that one if it comes up? Ed |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The code you show does not cause the SaveAs dialog to show. suspect you
have this in the BeforeSave event. If so, you need to add Cancel = True -- Regards, Tom Ogilvy "Ed" wrote in message ... I have Application.DisplayAlerts = False Application.EnableEvents = False wb.SaveAs strFName Application.EnableEvents = True Application.DisplayAlerts = True DisplayAlerts suppresses the message that I'm overwriting a file, but will not keep the SaveAs dialog box from popping up. I'm using XL2000, SP-3. Any suggestions? Do I have to work through the DIalogs collection and kill that one if it comes up? Ed |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Ed" wrote in message ... I have Application.DisplayAlerts = False Application.EnableEvents = False wb.SaveAs strFName Application.EnableEvents = True Application.DisplayAlerts = True DisplayAlerts suppresses the message that I'm overwriting a file, but will not keep the SaveAs dialog box from popping up. I'm using XL2000, SP-3. Any suggestions? Do I have to work through the DIalogs collection and kill that one if it comes up? Ed You can use the saved property like below Sub CloseWithoutChanges() ThisWorkbook.Saved = True ThisWorkbook.Close End Sub Best Regards,Fredrik |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are correct, Tom (as usual!). And, again, I owe you great thanks for
your help. So it must be something about being in the Save event already, and then invoking it again, but I'm only dealing with the one I invoke, rather than the one I initiated to get into the event(?). Ed "Tom Ogilvy" wrote in message ... The code you show does not cause the SaveAs dialog to show. suspect you have this in the BeforeSave event. If so, you need to add Cancel = True -- Regards, Tom Ogilvy "Ed" wrote in message ... I have Application.DisplayAlerts = False Application.EnableEvents = False wb.SaveAs strFName Application.EnableEvents = True Application.DisplayAlerts = True DisplayAlerts suppresses the message that I'm overwriting a file, but will not keep the SaveAs dialog box from popping up. I'm using XL2000, SP-3. Any suggestions? Do I have to work through the DIalogs collection and kill that one if it comes up? Ed |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
the dialog is from the one you initiate manually - remember this is the
BeforeSave event. So when your code completes, the original save you initiate puts up the dialog. Setting Cancel = True cancels the processing of the initial triggering event. -- Regards, Tom Ogilvy "Ed" wrote in message ... You are correct, Tom (as usual!). And, again, I owe you great thanks for your help. So it must be something about being in the Save event already, and then invoking it again, but I'm only dealing with the one I invoke, rather than the one I initiated to get into the event(?). Ed "Tom Ogilvy" wrote in message ... The code you show does not cause the SaveAs dialog to show. suspect you have this in the BeforeSave event. If so, you need to add Cancel = True -- Regards, Tom Ogilvy "Ed" wrote in message ... I have Application.DisplayAlerts = False Application.EnableEvents = False wb.SaveAs strFName Application.EnableEvents = True Application.DisplayAlerts = True DisplayAlerts suppresses the message that I'm overwriting a file, but will not keep the SaveAs dialog box from popping up. I'm using XL2000, SP-3. Any suggestions? Do I have to work through the DIalogs collection and kill that one if it comes up? Ed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can you Pre-fill file name in SaveAs dialog | Excel Worksheet Functions | |||
SaveAs dialog | Excel Discussion (Misc queries) | |||
Disable Saveas Dialog | Excel Programming | |||
Saveas Dialog Box | Excel Programming | |||
SaveAs Dialog Arguments | Excel Programming |