PC Review


Reply
Thread Tools Rate Thread

automatically deleting a worksheet (without warning prompt)

 
 
Guerilla
Guest
Posts: n/a
 
      21st Apr 2007

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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?dXJrZWM=?=
Guest
Posts: n/a
 
      21st Apr 2007
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
>
>

 
Reply With Quote
 
JMay
Guest
Posts: n/a
 
      21st Apr 2007
Add these 2 lines to your macro:

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

HTH

"Guerilla" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> 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


 
Reply With Quote
 
Guerilla
Guest
Posts: n/a
 
      21st Apr 2007

Both answers worked, thank you very much.

Matt

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get it to prompt a warning before deleting a record djscott242 Microsoft Access 1 11th Mar 2009 08:48 PM
Opening Warning Prompt =?Utf-8?B?U3RhbXBpZQ==?= Microsoft Access 6 28th Nov 2008 02:45 PM
OL2002 - no warning prompt when deleting contacts - is that right? Ian R Microsoft Outlook Discussion 3 17th Aug 2007 04:12 PM
Deleting rows from a worksheet automatically =?Utf-8?B?bWdfc3Zfcg==?= Microsoft Excel Worksheet Functions 2 19th May 2006 03:45 PM
EFS Encrypted File Prompt/warning pipex Newsgroups Microsoft Windows 2000 Security 1 7th Sep 2004 02:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:10 AM.