File Saving

austin350s10

Active Member
Joined
Jul 30, 2010
Messages
321
I am using a script to save the active workbook only thing is when the user already has the workbook saved with the same name excel asks them if they want to replace it or not.

If the user clicks the cancel button an error screen pops up

Is there a way avoid the error screen or better yet is there a way to force excel to overwrite a file name if it already exists?
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
46,258
Office Version
  1. 365
Platform
  1. Windows
You may need to post your existing code, but see if this would help
Code:
Application.DisplayAlerts = False

'Put your code to do the SaveAs here

Application.DisplayAlerts = True
 

Watch MrExcel Video

Forum statistics

Threads
1,109,131
Messages
5,527,019
Members
409,735
Latest member
viktor90

This Week's Hot Topics

Top