Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I am trying to do something very simple: code up a "Save as" dialog with
a default filename. The code below nearly works. With Application.FileDialog(msoFileDialogSaveAs) .InitialFileName = "C:\Temp\Test.xls" If .Show = -1 Then .Execute End If End With The problem is that if the file already exists, the user is asked a "do you wish to overwrite?" question *twice* - the first time by the dialog and the second by VBA on the "Execute". If the user responds "yes" followed by "no", they get a runtime error "Method 'Execute' of 'FileDialog' failed." What am I doing wrong? I am using Excel 2002 Sp-2 Thanks in advance MattM |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 | Excel Discussion (Misc queries) | |||
How do you turn off "Save a copy/Overwrite changes" dialog box | Excel Discussion (Misc queries) | |||
Macro help - "Save As" when a file already exists | Excel Programming | |||
Getting "Save as PDF File" Dialog at end of printing to PDF using PDFwriter | Excel Programming | |||
Problem- Recording macros for "file save" and "File open" | Excel Programming |