Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-04-2012, 06:12 AM
Chayes Chayes is offline Variable to rename a tab in a worksheet via VBA Windows XP Variable to rename a tab in a worksheet via VBA Office 2003
Advanced Beginner
Variable to rename a tab in a worksheet via VBA
 
Join Date: May 2012
Posts: 79
Chayes is on a distinguished road
Default Variable to rename a tab in a worksheet via VBA

Hi



I'm trying to rename a worksheet tab via VBA.

My problem is that the tab has a changing name.

EG
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "File 1"

"Sheet1" in this case will change in name next time I want to run the macro , so it will fail.

How can I build in a variable for the sheet selection so I can always rename it 'File 1' , whatever it used to be. It's always and only the first sheet I'm applying this to , by the way.

Grateful for any help.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Rename a Quick Part sleake Word 14 10-14-2013 09:21 AM
Variable to rename a tab in a worksheet via VBA Run-time error '91': Object variable or With block variable not set tinfanide Excel Programming 2 06-10-2012 10:17 AM
Rename Files gsrikanth Excel Programming 3 05-14-2012 03:03 AM
Variable to rename a tab in a worksheet via VBA "Auto-populating" data-worksheet to worksheet. meggenm Excel 4 02-04-2012 02:04 AM
Variable to rename a tab in a worksheet via VBA Rename File cksm4 Word VBA 2 02-25-2011 09:29 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:04 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