quick and dirty

project_man

New Member
Joined
May 5, 2002
Messages
12
I have some code that deletes a sheet and saves and closes a file, but I always get the "are you sure you want to delete this sheet..." and "Are you sure you wnat to replace this file..." messages. How can I stop these irritating messages from showing up? Here is the code I have:

ActiveWorkbook.SaveAs Filename:= _
"C:Documents and SettingsAll UsersDocumentsPainintheass.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False

Sheets("Frustrated").Select
ActiveWindow.SelectedSheets.Delete
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
in the start of the code put
Application.displayAlerts=False
and
in the ending
Application.displayAlerts=True

regards
Tommy
 
Upvote 0
in the start of the code put
Application.displayAlerts=False
and
in the ending
Application.displayAlerts=True

regards
Tommy
 
Upvote 0

Forum statistics

Threads
1,211,802
Messages
6,104,064
Members
447,892
Latest member
madara uchiha

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