Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default VBA for deleting a sheet

I am using the following code to delete a sheet within Excel:

ActiveWindow.SelectedSheets.Delete

Problem is, it is prompting the user to see if it is okay to delete. In
every scenario of this macro, it will be okay to delete, so how can I bypass
this message?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default VBA for deleting a sheet

Hi Mike,

Try:

Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True

---
Regards,
Norman



"Mike" wrote in message
...
I am using the following code to delete a sheet within Excel:

ActiveWindow.SelectedSheets.Delete

Problem is, it is prompting the user to see if it is okay to delete. In
every scenario of this macro, it will be okay to delete, so how can I
bypass
this message?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA for deleting a sheet


Hello Mike,

Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DispalyAlerts = True

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=487372

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default VBA for deleting a sheet

thanks to both of you

"Leith Ross" wrote:


Hello Mike,

Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DispalyAlerts = True

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=487372


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
Deleting a sheet Kjeldc Excel Programming 1 August 9th 05 02:25 PM
Deleting sheet Brandi[_2_] Excel Programming 2 October 7th 04 09:31 PM
Deleting a sheet P. Dileepan[_2_] Excel Programming 3 April 12th 04 10:34 AM
Deleting Sheet Tommi[_2_] Excel Programming 3 December 18th 03 05:28 PM
Deleting a Sheet Abdul Salam Excel Programming 1 July 29th 03 12:43 AM


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

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

About Us

"It's about Microsoft Excel"