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 able to find a simple solution to error trapping the ActiveWorkbook.SaveAs method. When the following command runs (inside a macro) and I select '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' the following error occurs... Runtime Error 1004: "Method 'SaveAs' object '_workbook' failed. ActiveWorkbook.SaveAs Filename:=sWorkBookPath & "\" _ & sFileName & ".txt", FileFormat:=xlText, CreateBackup:=False How can I stop the macro crashing when I select 'no'? Thanks, Louis |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SaveAs method error | Excel Discussion (Misc queries) | |||
Error When using ActiveWorkBook.SaveAs and EnableEvents in same macro | Excel Programming | |||
Error When using ActiveWorkBook.SaveAs in Excel | Excel Programming | |||
Error on ActiveWorkbook.SaveAs method | Excel Programming | |||
Error on ActiveWorkbook.SaveAs method | Excel Programming |