Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm having trouble with the syntax for using generic sheet names in a
macro/VBA in Excel. My working code follows where Sheet1='Part 1 Color 1' and Sheet2='Part 1 Color 2'. I've tried using Sheet1 and Sheets(1) in every possible format I can think of -- with and without apostrophes, quotes, brackets, etc. -- but I keep getting error messages. Any and all help will be appreciated!! CODE: Sub Consolidate_LH_RH() ' ' Consolidate_LH_RH Macro ' Macro recorded 12/18/2004 by Cindy Rogers ' ' Range("Consolidate_ALL").Select Selection.Consolidate Sources:=Array( _ "'Part 1 Color 1'!R29C1:R46C32" _ , _ "'Part 1 Color 2'!R29C1:R46C32" _ ), Function:=xlSum, TopRow:=False, LeftColumn:=True, CreateLinks:=False ActiveWindow.SmallScroll Down:=23 Range("O61").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using the Excel generic worksheet names instead of user-given names in code | Excel Discussion (Misc queries) | |||
Generic Worksheet Names | Excel Discussion (Misc queries) | |||
Cell names = sheet names | Excel Worksheet Functions | |||
Generic Sheet Names | Excel Programming | |||
return all worksheet tab names and chart sheet tab names in report - an example | Excel Programming |