View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Emmanuel[_2_] Emmanuel[_2_] is offline
external usenet poster
 
Posts: 1
Default Setting up a SourceData:= in VB

I currently have the following code written in VB:

Worksheets("Pivots").Activate
Range("A21").Activate
Sheets("Pivots").PivotTableWizard
SourceType:=xlPivotTable, SourceData:= _
"[Fox Raven Market Share Tool 2.xls]Pivot Table!
PivotTable1"

How can I make this code smarter (I'd like to remove the
[Fox Raven Market Share Tool 2.xls] reference from it.

Thanks for your help,
Emmanuel