Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling Save Prompt In SaveAs Command 2

Status
Not open for further replies.

TheMus

Technical User
Aug 23, 2000
28
0
0
US
Hello,

I'm trying to save a spreadsheet on a shared drive and also on my hard drive. The shared drive file is saved using the "Save" command, but when I'm saving the hard drive file I'm using the "SaveAs" command. How can I disable the Save Prompt via my code? Here is the code I'm using...

ActiveWorkbook.SaveAs FileName:="J:\Interims\Interim_Data_VLBSC.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Thanks in advance,

Rus
 
I'm not sure exactly what you want to disable, as your code should save the workbook with using the FileSave dialog box. If you want to disable messages about overwriting an existing file you can place

Application.DisplayAlerts = False

before the code you are using, and set it back to True when your code is finished.

A.C
 
A.C, you are right on the $$! Thanks for the help.
 
Um, just one thing to add, I usually set Application.DisplayAlerts = True
back to true after the save is done, just in case it is needed somewhere else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top