Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help! Excel Macro Delete function!!

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

Sheets("Report").Delete

However when I run the macro, the user will be prompted if th
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 th
worksheet without asking the confirmation from user?

Million Thank

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Help! Excel Macro Delete function!!

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?


Application.DisplayAlerts = False
Worksheets("Report").Delete
Application.DisplayAlerts = True
HTH,
Merjet




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help! Excel Macro Delete function!!

Thank you!! It works nicely

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
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.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Delete VB Macro Ty Excel Worksheet Functions 9 August 10th 09 03:31 PM
How do i delete a macro in Excel 2003 when delete isn't highlight Abel Excel Discussion (Misc queries) 2 September 13th 05 04:09 AM
Excel Problem - Delete Row Macro thesteelmaker Excel Programming 3 February 15th 04 12:16 AM
Delete records using excel Macro Ken Wright Excel Programming 1 November 3rd 03 08:01 PM
Delete records using excel Macro Nick Hodge[_4_] Excel Programming 0 November 3rd 03 07:31 PM


All times are GMT +1. The time now is 02:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"