Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I hope there is a really simple answer to this but I have not been abl to find a simple solution to error trapping the ActiveWorkbook.SaveA method. When the following command runs (inside a macro) and I selec 'yes' from the dialog box when it says "the file already exists do want to replace it?" - that's fine. When I select 'no' or 'cancel' th following error occurs... Runtime Error 1004: "Method 'SaveAs' o object '_workbook' failed The method is: (where sWorkBookPath and sFileName are variables for m path and filename) ActiveWorkbook.SaveAs Filename:=sWorkBookPath & "\" _ & sFileName & ".txt", FileFormat:=xlText, CreateBackup:=False How do I stop the macro crashing when I select 'no' Kindy Regards And -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SaveAs method error | Excel Discussion (Misc queries) | |||
Max charactors for 'ActiveWorkbook.SaveAs Filename'? | Excel Worksheet Functions | |||
Question Using SaveAs Method | Excel Programming | |||
Error Excel: 1004 SaveAs method of Workbook class failed | Excel Programming | |||
SaveAs method | Excel Programming |