Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Danny
 
Posts: n/a
Default Can I have a variable fed tab name?

I have a time tracking workbook, with 20 time tracking spreadsheets. One for
each employee. I am using a sheet tab naming convention of (week ending
date-Lastname) i.e. WE-DEC-30-Smith. Can I create a variable for week ending
date that I can feed to the tab name from a list of names I have in an
admistrative worksheet at the beginning of the workbook? Otherwise, I have to
manually rename each of the 20 tabs for every week.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob_F_Roecker
 
Posts: n/a
Default Can I have a variable fed tab name?

Dear Danny:

I haven't seen anyone answer your post yet and I'll tell you right off I'm
not good enough with VBA to write what you want. But let me see if I can
help you get an answer to your questions.

You wrote a CAN I question and the answer is YES.

You can control the sheet names using VBA. If you were to record a macro
for it you'd end up with something like

Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Dog"\

This is the basic format of what you're trying to do. What I can do for you
from here is point you in the right direction.

First off you'll need a macro to identify what part of the sheet name you're
going to want to change.
--Search the forum/google on this topic or post a question to the Excel
Programmers forum

Next you'll need to specify what text it gets changed to. That's easy
enough. Have it reference a cell that you put the data into. So your next
question would be how to you rename PART of a tabname with the value of a
cell?
-- Do another search in the forum(s) for this one or post a new specific
question

Lastly remember that your 'dates' are going to need to be TEXT for the macro
to work. Excel will read the serial number date value irregarless of how you
have the date formatted. You may need to lookup a way to convert a date to
text only or you'll have to manually enter the TEXT version of the date.

I hope this helped. It breaks up you're project into manageable areas that
others (who are more capable) will be able to help you with.

Good Luck!!!

If I knew how to write it for you I would. But I'm still learning.



"Danny" wrote:

I have a time tracking workbook, with 20 time tracking spreadsheets. One for
each employee. I am using a sheet tab naming convention of (week ending
date-Lastname) i.e. WE-DEC-30-Smith. Can I create a variable for week ending
date that I can feed to the tab name from a list of names I have in an
admistrative worksheet at the beginning of the workbook? Otherwise, I have to
manually rename each of the 20 tabs for every week.

Reply
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
object variable or with block variable not set Diego Excel Discussion (Misc queries) 1 August 9th 05 02:46 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
make a vlookup using a variable path Alex St-Pierre Excel Worksheet Functions 1 March 2nd 05 11:54 PM
I Need VBA Assistance for global variable question Brent E Excel Discussion (Misc queries) 1 March 1st 05 08:46 PM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM


All times are GMT +1. The time now is 03:46 PM.

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

About Us

"It's about Microsoft Excel"