Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 386
Default Delete sheet code

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Delete sheet code

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
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
Code to delete shapes each time a sheet is deactivated DlgomesBR Excel Programming 2 November 4th 07 12:51 PM
What is the VBA code to delete a sheet without warning message? [email protected] Excel Discussion (Misc queries) 2 August 9th 05 04:16 PM
VBA code delete code but ask for password and unlock VBA protection WashoeJeff Excel Programming 0 January 27th 04 07:07 AM
Delete sheet code Gareth[_3_] Excel Programming 3 October 19th 03 07:24 PM
Code to not display delete sheet alerts John[_46_] Excel Programming 2 August 25th 03 01:44 PM


All times are GMT +1. The time now is 05:48 PM.

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"