LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Generic Sheet Names

Thanks so much for your help. Here's my actual code ... I'm not sure how to
incorporate the your logic?? In the code following Sheet1 = 'Part 1 Color
1'; Sheet2 = 'Part 1 Color 2'; Sheet3 = 'Part 1 Color 3'

Sub Consolidate_LH()
'
' Consolidate_LH Macro
' Macro recorded 12/18/2004 by Cindy Rogers
'

'
Range("Consolidate_1").Select
Selection.Consolidate Sources:=Array( _
"'Part 1 Color 1'!R29C1:R46C32" _
, _
"'Part 1 Color 2'!R29C1:R46C32" _
, _
"'Part 1 Color 3'!R29C1:R46C32" _
), Function:=xlSum, TopRow:=False, LeftColumn:=True,
CreateLinks:=False
ActiveWindow.SmallScroll Down:=23
Range("O61").Select
End Sub


"ben" wrote:

refer to the sheets by index number eg
sheets(1)
sheets(2)
sheets(3)
the index number is the order in which they were created in the new workbook
sheets(1).name will return a name you can work with
or when you rename your sheets assign it to a variable
sheet1.name = "Yourname"
yourn = sheet1.name
sheets(yourn).range("a1").value = yourn


"ckrogers" wrote:

I'm creating a spreadsheet with a macro to consolidate the data on individual
worksheets. The spreadsheet will be used as a template and copied as required
for different scenarios; the worksheets will then be renamed for specific
part numbers. Is there a way I can identify the worksheets with their
generic names (Sheet1, Sheet2, etc.) in the Visual Basic code of the macro so
they will still work even when the individual sheets are renamed?

 
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
using the Excel generic worksheet names instead of user-given names in code Paul Excel Discussion (Misc queries) 5 June 26th 09 08:44 PM
Generic Worksheet Names Tendresse Excel Discussion (Misc queries) 2 July 9th 08 10:33 PM
Cell names = sheet names Vince Excel Worksheet Functions 9 February 8th 08 03:59 PM
I want to print out the sheet tabs (sheet names) Sundus Excel Worksheet Functions 3 February 23rd 05 08:34 PM
return all worksheet tab names and chart sheet tab names in report - an example DataFreakFromUtah Excel Programming 2 October 6th 04 08:09 PM


All times are GMT +1. The time now is 05:56 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"