|
-
May 3rd, 2005, 03:34 PM
#1
Thread Starter
Addicted Member
VB-Excel SaveAs method, if file exists, rename without prompting
When using the SaveAs method in VB to save my Excel sheet, if the user entered an existing filename, I want my code to just append a 1 to the end of the filename, save it and move on, no prompting, etc.
Right now if the file exists, a msgbox pops up asking if i want to over-right, if you say no, it asks to save book1. I then want that saved as Filename-1 I want this to happen all behind the scenes.
I know I could probably do some FSO stuff to check but wondering if there is a shorter way, like does the SaveAs throw an error that I can trap?
Last edited by Kraig K; May 4th, 2005 at 02:31 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|