Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-15-2012, 08:43 AM
Catalin.B Catalin.B is offline Create/delete New worksheet Windows Vista Create/delete New worksheet Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

add this line:
Code:
ThisWorkbook.Sheets.Add After:=Sheets(Sheets.Count)
or:
Code:
Worksheets.Add().Name = "MySheet"
or, if you want to add more than 1 sheet, use:
Code:
Worksheets.Add After:=Worksheets(Worksheets.Count), Count:=4
to delete a sheet use:
Sheets("Sheet1").delete
or:
ActiveSheet.delete
Make sure to turn off events if you do not want to see the confirmation pop-up message: (change back to true after you delete the sheet)
Code:
Application.DisplayAlerts = False
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete option greyed out when trying to delete row 1 tpcervelo Excel 2 11-15-2011 06:48 AM
Create/delete New worksheet How to delete page not worksheet? rec Excel 6 05-20-2011 08:51 PM
delete email message via blackberry and have it delete on my pop3 and my outlook Iamthestorm Outlook 2 10-28-2010 12:21 AM
Create/delete New worksheet Can I use a formula to name a worksheet? nolesca Excel 3 06-07-2010 04:02 PM
Create/delete New worksheet Worksheet copying? markg2 Excel 4 01-07-2010 10:08 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:44 AM.


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