See duplicate post http://www.mrexcel.com/forum/showthread.php?t=639475Thanks for your reply.
here's my code.
ActiveWorkbook.SaveAs Filename:=myfilename
MsgBox ("File Saved.")
The above code works fine if the "myfilename" doent exists. When the filename already exists, a display allerts message pops up that says"filename exists. Do you want to replace it? if user clicks OK, the code works fine as is. But when the button NO or CANCEL is clicked, the program displays error message,,, end or debug..... I want to terminate the code when NO or CANCEL is selected, how is it done? thanks
Any one here know anything about macros in excel?
See duplicate post http://www.mrexcel.com/forum/showthread.php?t=639475
I'm not a VBA expert.
You help the forummember is you put you whole code.
Thanks for your reply.
here's my code.
ActiveWorkbook.SaveAs Filename:=myfilename
MsgBox ("File Saved.")
The above code works fine if the "myfilename" doent exists. When the filename already exists, a display allerts message pops up that says"filename exists. Do you want to replace it? if user clicks OK, the code works fine as is. But when the button NO or CANCEL is clicked, the program displays error message,,, end or debug..... I want to terminate the code when NO or CANCEL is selected, how is it done? thanks