ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   join strings in VB with Pivot methods (https://www.excelbanter.com/excel-programming/292819-join-strings-vbulletin-pivot-methods.html)

vish

join strings in VB with Pivot methods
 
Hi,

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

----------------------------------------------------------
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase,
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


Frank Kabel

join strings in VB with Pivot methods
 
Hi
try
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase,
SourceData:= _
Range(string_variable)).CreatePivotTable
TableDestination:="", _
TableName:="PivotTable6",
DefaultVersion:=xlPivotTableVersion10

--
Regards
Frank Kabel
Frankfurt, Germany

vish wrote:
Hi,

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

----------------------------------------------------------
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase,
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



All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com