Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
working with ranges
Hi,
Am suffering from rust and fatigue - am sure this muust be something simple. In time-honoured fashion I am recording macros and then modifying them. This is my first attempt at doing this to a Pivot Table. This is what I have recorded: ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _ "Data!R6C1:R611C11").CreatePivotTable TableDestination:= _ "'[FDMFormatTemplate c Instructions.XLS]Country'!R1C1", TableName:= _ "PivotTable2", DefaultVersion:=xlPivotTableVersion10 I want the "Data!R6C1:R611C11" to be dynamic - I have the code to create this string, but my problem is in passing the variable. Let's say the string is X - it seems I can't simply say blah blah SourceData: = X blah blah... (where X="Data!R6C1:R611C11"). I have a sinking feeling this is something blindingly obvious ... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Working with Ranges...Need help | Excel Discussion (Misc queries) | |||
vba - working with autofiltered ranges | Excel Programming | |||
vba - working with autofiltered ranges | Excel Programming | |||
vba - working with autofiltered ranges | Excel Programming | |||
Working with ranges | Excel Programming |