Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a simple macro to Save-As the workbook. If the workbook already
exists where its suppose to save to, then naturally a dialog box comes up asking if I want to overwrite the file. If the user clicks NO, then run-time erorr 1006 comes up "Method 'Save-As' of object '_ workbook' failed." Can I add code to just ignore the error and continue on? Thanks, J.O. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the DisplayAlerts property to suppress warning messages.
E.g., Application.DisplayAlerts = False ThisWorkbook.SaveAs "H:\Book2.xls" Application.DisplayAlerts = True -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "excelnut1954" wrote in message ups.com... I have a simple macro to Save-As the workbook. If the workbook already exists where its suppose to save to, then naturally a dialog box comes up asking if I want to overwrite the file. If the user clicks NO, then run-time erorr 1006 comes up "Method 'Save-As' of object '_ workbook' failed." Can I add code to just ignore the error and continue on? Thanks, J.O. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Error Resume Next
' current code On Error goto 0 I would include the minimum number of lines of code between these two commands as necessary - otherwise you can mask real errors. -- Regards, Tom Ogilvy "excelnut1954" wrote: I have a simple macro to Save-As the workbook. If the workbook already exists where its suppose to save to, then naturally a dialog box comes up asking if I want to overwrite the file. If the user clicks NO, then run-time erorr 1006 comes up "Method 'Save-As' of object '_ workbook' failed." Can I add code to just ignore the error and continue on? Thanks, J.O. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks guys. Always appreciate the help.
J.O. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to prevent zero error message for logarithmic plots | Charts and Charting in Excel | |||
How to write a formula that will prevent appearance ERROR MESSAGE | Excel Worksheet Functions | |||
Prevent Error Message | Excel Programming | |||
Macro Error Message | Excel Programming | |||
Macro Error Message | Excel Programming |