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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
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,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

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