Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default automatically deleting a worksheet (without warning prompt)


Hi,

A macro I use deletes a sheet tab, however, it prompts me to confirm
the deletion of the sheet. How can I remove this prompt so the macro
runs without any user interaction?

Matt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default automatically deleting a worksheet (without warning prompt)

I think you can use this:

Sub delSheet()

Application.DisplayAlerts = False
Application.Sheets(1).Delete

End Sub


--
urkec


"Guerilla" wrote:


Hi,

A macro I use deletes a sheet tab, however, it prompts me to confirm
the deletion of the sheet. How can I remove this prompt so the macro
runs without any user interaction?

Matt


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default automatically deleting a worksheet (without warning prompt)

Add these 2 lines to your macro:

Application.Displayalerts = False '<<<< here
worksheets("TempData").Delete
Application.Displayalerts = True ' <<< and here

HTH

"Guerilla" wrote in message
oups.com:

Hi,

A macro I use deletes a sheet tab, however, it prompts me to confirm
the deletion of the sheet. How can I remove this prompt so the macro
runs without any user interaction?

Matt


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default automatically deleting a worksheet (without warning prompt)


Both answers worked, thank you very much.

Matt

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
Need Warning Box before deleting cells dzierzekr Excel Programming 2 September 21st 06 03:42 PM
Delete Sheet w/o warning prompt... Jeff Harbin[_4_] Excel Programming 6 September 9th 06 02:39 AM
Deleting rows from a worksheet automatically mg_sv_r Excel Worksheet Functions 2 May 19th 06 03:45 PM
Deleting Sheets Warning narutard[_28_] Excel Programming 2 September 14th 05 04:22 PM
deleting sheet: how to omit warning Marco Braun Excel Programming 4 December 9th 03 03:54 PM


All times are GMT +1. The time now is 11:42 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"