Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2010, 10:35 PM
Salim Khan Salim Khan is offline Delete sheet through VBA Windows XP Delete sheet through VBA Office 2003
Novice
Delete sheet through VBA
 
Join Date: Aug 2010
Posts: 1
Salim Khan is on a distinguished road
Default Delete sheet through VBA

I am unable to delete a worksheet in excel (office-2003) contaning data on it.



pls help
Reply With Quote
  #2  
Old 08-30-2010, 09:11 AM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline Delete sheet through VBA Windows XP Delete sheet through VBA Office 2003
Simulacrum
 
Join Date: Jan 2010
Location: Victoria, Canada
Posts: 86
ConneXionLost is on a distinguished road
Default

Use this on any sheet that is not protected:

Code:
Sub RemoveSpecificSheet()
Dim DeleteWS As String

DeleteWS = InputBox("Which Sheet do you want to delete?")

Sheets(DeleteWS).Delete

End Sub
Cheers,
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Make row in one sheet equal column of another hypertyper Excel 6 01-31-2012 03:48 PM
Delete sheet through VBA Any tutorial same as to this excel sheet with code? Learner7 Excel 1 05-18-2010 05:31 PM
copy cell from sheet 2 to sheet 3 macro slipperyjim Excel Programming 1 02-18-2010 01:31 AM
Template for Noting Sheet. Goldenbird Word 8 05-25-2009 05:48 AM
sheet linking, sorting nickbfe Excel 0 05-19-2006 11:00 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft