View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Change hardcoded filename

This one worked just fine, once I got over the "word wrap" thing <g.

Thanks for the alternative, Bob.

Vaya con Dios,
Chuck, CABGx3



"Bob Phillips" wrote:

ActiveSheet.PivotTableWizard SourceType:=xlDatabase, SourceData:= _
"Labor!R9C3:R173C22",
TableDestination:="[" & Activeworkbook.Name & "]Pivots!R18C1", _
TableName:="PivotTable1"

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"CLR" wrote in message
...
Hi All........

I have the following code which works fine, but has the Filename hardcoded
therein, and whenever I change the filename, the macro quits working. How
might the code be changed to accomodate the Activefilename whatever it

might
be?

ActiveSheet.PivotTableWizard SourceType:=xlDatabase, SourceData:= _
"Labor!R9C3:R173C22",
TableDestination:="[BigOneReport1j.xls]Pivots!R18C1", _
TableName:="PivotTable1"


TIA
Vaya con Dios,
Chuck, CABGx3