Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, I have this Save As code linked to a Option Button. Everything works as i want it to, except when there is already been a file saved with the current date. Then i get a message box asking if i want to overwrite the file. I DO want that. BUT if i answer "No" or "Cancel" i get a Visual Basic "Error 400" thingy. I DON'T want that error message. If i put like "Application.DisplayAlerts = False" in then it also blocks the "Do i want to overwrite dialog", which i want to keep. Code: -------------------- Private Sub SaveAsTo() Application.ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Path & "\" & _ "myfile " & Format(Date, "mm-dd-yyyy") & ".xls" End Sub -------------------- Any direction on this would shurly be appreciated. -- Desert Piranha ------------------------------------------------------------------------ Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934 View this thread: http://www.excelforum.com/showthread...hreadid=499135 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming |