Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
comotoman
 
Posts: n/a
Default Macro for sheet delete, very easy


my code is:
Sheets("Sheet 1 (2)").Select
ActiveWindow.SelectedSheets.Delete

How can i hace it delete the seleted sheet, not always 'Sheet 1 (2)'?


--
comotoman
------------------------------------------------------------------------
comotoman's Profile: http://www.excelforum.com/member.php...o&userid=27292
View this thread: http://www.excelforum.com/showthread...hreadid=475211

  #2   Report Post  
Dave O
 
Posts: n/a
Default

This code deletes the active sheet, with no prompt for confirmation:

Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete

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
Error when trying to delete a macro... Currie Excel Discussion (Misc queries) 5 July 6th 05 07:31 PM
Can't find macro in an Excel file to delete it Ron Excel Discussion (Misc queries) 3 July 1st 05 01:07 PM
Macro data selection line delete Frantic Excel-er Excel Discussion (Misc queries) 0 May 31st 05 11:46 PM
Macro to delete first line of 200+ files Bob Dobalina Excel Discussion (Misc queries) 2 May 26th 05 10:04 PM
delete personal macro kalz Excel Discussion (Misc queries) 3 March 22nd 05 03:13 AM


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