join strings in VB with Pivot methods

  • Thread starter Thread starter vish
  • Start date Start date
V

vish

Hi,

I need to join several strings inorder to use string
varaible in a pivot method as shown below

----------------------------------------------------------
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase,
SourceData:= _
"'WW07-Bugs'!R1C1:R4855C23").CreatePivotTable
TableDestination:="", _
TableName:="PivotTable6",
DefaultVersion:=xlPivotTableVersion10
-------------------------------------------------------
I want to replace the SourceData value with a string var
instead of the
value "'WW07-Bugs'!R1C1:R4855C23"


Is it possible

Thanx
 
Hi
try
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase,
SourceData:= _
Range(string_variable)).CreatePivotTable
TableDestination:="", _
TableName:="PivotTable6",
DefaultVersion:=xlPivotTableVersion10
 
Back
Top