VBA code for stopping the save promt box from poping up

HeyHey89

New Member
Joined
Jun 22, 2018
Messages
5
I am running a VBA code to convert several excel files and I am needing to get the pop up prompt to stop showing. This is the code I am working with

Application.DisplayAlerts = False

ActiveWorkbook.SaveAs Filename:"E\bob_smith\Done.txt" FileFormat:=xlText

Application.DisplayAlerts = True

I have tried

1.
ActiveWorkbook.SaveAs Filename:"E\bob_smith\Done.txt" FileFormat:=xlText = True

2. Application.EnableEvents= False

3. Application.ScreenUpdating= False
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
If the message is popping up when you close a workbook that you have just done the SaveAs on then this syntax would prevent the alert message.
Code:
ActiveWorkbook.Close False
It tells Excel that you do not want to save the workbook again. If you do want to save it again then use True as a parameter.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top