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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Tommy Bak

Active Member
Joined
Feb 25, 2002
Messages
288
in the start of the code put
Application.displayAlerts=False
and
in the ending
Application.displayAlerts=True

regards
Tommy
 

Tommy Bak

Active Member
Joined
Feb 25, 2002
Messages
288
in the start of the code put
Application.displayAlerts=False
and
in the ending
Application.displayAlerts=True

regards
Tommy
 

Watch MrExcel Video

Forum statistics

Threads
1,129,751
Messages
5,638,151
Members
417,010
Latest member
jnuss03

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
Top