LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
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.
 
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
search for variable worksheet name and rename larrydave Excel Programming 3 April 17th 08 01:37 PM
rename the new worksheet raraschek Excel Programming 5 April 2nd 07 06:58 AM
Rename files with variable names Robert_L_Ross Excel Programming 1 June 20th 06 06:52 PM
Using information from one worksheet, to rename inserted worksheet Lyn Excel Worksheet Functions 0 March 24th 06 12:54 AM
VBA: rename a variable qwerqtzui Excel Programming 3 November 5th 03 05:03 PM


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"