PDA

View Full Version : [SOLVED:] Bypassing a dialog box



kualjo
08-01-2014, 08:11 AM
My code currently opens a .csv file and saves it as a .xlsx file. Going forward, every new .csv file will be saved over the existing .xlsx file. Once that file is established, however, I will always get a dialog box telling me that the file already exists with that name and asking me if I want to overwrite it. My answer will always be YES, so I just want the code to go ahead and overwrite. How do I tell VBA to ignore the dialog box and save the new file over the existing file?

jolivanes
08-01-2014, 09:48 AM
Application.DisplayAlerts = False


your code here


Application.DisplayAlerts = True

kualjo
08-01-2014, 10:28 AM
Thanks jolivanes. I knew it had to be something simple like that!