PC Review


Reply
Thread Tools Rate Thread

Delete sheet code

 
 
LiAD
Guest
Posts: n/a
 
      15th May 2009
Hi,

Using the VB recorder I got a code to delete a sheet that is;

Sheets("Machines").Select
ActiveWindow.SelectedSheets.delete

It runs and works. One small issue is that it asks Are you sure you want to
delete this sheet? The user must choose yes before it continues.

Can I disable the need to ask this question - once the user hits the button
it deletes, no questions?

Thanks
LiAD
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      15th May 2009
Application.DisplayAlerts = False
Sheets("Machines").Delete
Application.DisplayAlerts = True

If this post helps click Yes
---------------
Jacob Skaria


"LiAD" wrote:

> Hi,
>
> Using the VB recorder I got a code to delete a sheet that is;
>
> Sheets("Machines").Select
> ActiveWindow.SelectedSheets.delete
>
> It runs and works. One small issue is that it asks Are you sure you want to
> delete this sheet? The user must choose yes before it continues.
>
> Can I disable the need to ask this question - once the user hits the button
> it deletes, no questions?
>
> Thanks
> LiAD

 
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
Trying to delete sheet code with VBA michael.beckinsale Microsoft Excel Programming 2 15th Jun 2010 12:41 PM
How to or delete a Excel sheet or tab thru VBA code? =?Utf-8?B?c2xpbWxlaA==?= Microsoft Access VBA Modules 12 5th Nov 2006 06:44 PM
Delete data in a linked Excel sheet using Access code or seql delete Rocky Microsoft Access External Data 9 26th Jun 2005 12:42 AM
Delete sheet code Gareth Microsoft Excel Programming 3 19th Oct 2003 07:24 PM
Code to not display delete sheet alerts John Microsoft Excel Programming 2 25th Aug 2003 01:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:15 PM.