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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top