Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi everyone, I have a macro called "generate". The following part of the code if giving me lot of grief: ActiveWorkbook.SaveAs FileName:=Fname, _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False If there is a file by the name Fname, then it asks whether it should be replaced or not. If you click "Yes" it works fine, but if you choose "No" or "Cancel" it crashes with the following message: Runtime Error '1004': Method 'SaveAs' of Object "_Workbook" failed Any help would be appreciated! S -- schoujar ------------------------------------------------------------------------ schoujar's Profile: http://www.excelforum.com/member.php...o&userid=26574 View this thread: http://www.excelforum.com/showthread...hreadid=468109 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Need macro to auto set option buttons all to "Yes" or "No" | Excel Worksheet Functions | |||
Why is the "zoom" option grayed out in "print preview?" | Excel Discussion (Misc queries) | |||
"assign macro" not an option from short menu | Excel Discussion (Misc queries) | |||
pictures to work with "data" "sort" option | Excel Discussion (Misc queries) | |||
commnd button - when i rt click, "assign macro" isnt an option... | Excel Programming |