I have been tinkering around with this save as code and I have it almost the way i want it.....
it saves where and what i want...
it gives me a message when there is a duplicate file in the folder.....
but one thing it does that I do not like is when it tries to close after a duplicate file is found it brings up the do you want to save workbook2 dialog..... I would like to do one of two things with it.... a) can i stop that dialog box from appearing and the workbook just closes without saving... or can i have the option to save it as something else
Sub SaveActiveSheet()
On Error GoTo userC
ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Administrator\Desktop\estimates 05\" & [c5].Value & ".xls"
MsgBox "your worksheet has just been saved!"
ActiveWorkbook.Close
Exit Sub
userC:
MsgBox "There is a file with that name already, File Not Saved!"
ActiveWorkbook.Close
Exit Sub
End Sub
it saves where and what i want...
it gives me a message when there is a duplicate file in the folder.....
but one thing it does that I do not like is when it tries to close after a duplicate file is found it brings up the do you want to save workbook2 dialog..... I would like to do one of two things with it.... a) can i stop that dialog box from appearing and the workbook just closes without saving... or can i have the option to save it as something else
Sub SaveActiveSheet()
On Error GoTo userC
ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Administrator\Desktop\estimates 05\" & [c5].Value & ".xls"
MsgBox "your worksheet has just been saved!"
ActiveWorkbook.Close
Exit Sub
userC:
MsgBox "There is a file with that name already, File Not Saved!"
ActiveWorkbook.Close
Exit Sub
End Sub