Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2015, 11:02 AM
charlesdh charlesdh is offline New Sheet naming Windows 7 32bit New Sheet naming Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Hi,

Here's a simple code to add and name a worksheet also delete the named worksheet.
Place this code in a module. Test on sample sheet ony.


Code:
Sub AddWorksheet()
Application.DisplayAlerts = False'' this will prevent warning about deleting the sheet
Sheets("Your sheet name").Delete
Application.DisplayAlerts = True ''this will reset the warning

Worksheets.Add().Name = "MySheet"''' change "MySheet to the name you want

End Sub

Reply With Quote
  #2  
Old 09-24-2015, 07:57 AM
FenelonPaul FenelonPaul is offline New Sheet naming Windows 8 New Sheet naming Office 2013
Novice
New Sheet naming
 
Join Date: Sep 2015
Posts: 6
FenelonPaul is on a distinguished road
Default Thanks!!!

Thanks, Charles.. that works perfectly for me!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch re-naming twols26 Word VBA 7 06-16-2015 12:29 PM
Populate sheet 3 with data from sheet 1 and sheet 2 speck Excel Programming 0 01-14-2015 07:54 AM
Naming Cells for formula referencing lynchbro Excel 6 06-26-2014 07:45 AM
New Sheet naming re-naming arrays in VBA? JDevsFan Excel Programming 4 03-15-2012 08:44 AM
Auto file naming Rong Peng Word VBA 0 07-29-2011 07:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:53 PM.


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