View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Amedee Van Gasse[_3_] Amedee Van Gasse[_3_] is offline
external usenet poster
 
Posts: 102
Default Help! Excel Macro Delete function!!

wmcray wrote:

I use the following command in the Excel Macro to delete an Excel
worksheet called "Report":

Sheets("Report").Delete

However when I run the macro, the user will be prompted if the
worksheet "Report" should be deleted.

I do not want user to be asked. Instead I want the worksheet "Report"
to be deleted automatically.

Can anyone please advise if there is a command to "force" delete the
worksheet without asking the confirmation from user?

Million Thanks


---
Message posted from http://www.ExcelForum.com/


Start every macro with

With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
.DisplayAlerts = False
End With

and end with

With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
.DisplayAlerts = True
End With

--
Amedee Van Gasse using XanaNews 1.16.3.1
If it has an "X" in the name, it must be Linux?
Please don't thank me in advance. Thank me afterwards if it works or
hit me in the face if it doesn't. ;-)

PS: I found 2 small shortcomings on www.excelforum.com:
1. You do *not* have to pay for access to news:msnews.microsoft.com
2. A *real* newsreader (not Outlook Express) is actually very easy to
use. See www.newsreaders.com for more info.