Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a workbook using VBA
I am trying to set up my workbook to save any changes on pressing of a button.
I have created the macro, which is simple and contains the one following line ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Name This quite expectedly shows up a dialogue box asking if I want to overwrite the existing file. If I select Yes,then the file saves without any problem. However if I say no or cancel then it produces the following error - Run-time error 1004, application-defined or object defined error. Ideally if I select no then I would want a dialogue that allows me to change the filename, or if I select Cancel then I would like it to just return to the current active worksheet. Ive been playing with this for days and I am no closer to solving it. Help anyone please |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Color Changes When Saving 2007 Workbook as 97 - 2003 Workbook | Excel Discussion (Misc queries) | |||
Saving a sheet in a workbook as .csv but not changing workbook name | Excel Programming | |||
saving workbook from URL | Excel Programming | |||
Saving a Workbook: Forcing User to Rename before Saving | Excel Programming | |||
Saving workbook | Excel Programming |