View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Pick up file from specific location

perhaps:

Sub Macro4()
Workbooks.Open Filename:=Range("B2").Value
Call pivoteer
End Sub

where cell B2 contains something like:

C:\Documents and Settings\Owner\Desktop\helper3.xls

--
Gary''s Student - gsnu200764


"Mandeep Dhami" wrote:

Hi,

I have recorded a macro for preparing Pivot Table.

I would like this macro to work for different excel files.

I require that when I enter path and file name in cell B2 in a file where
macro is stored, the macro picks up file stored in this location and runs the
macro that I have recorded and prepared pivot table.

Can you help me with this request.

Cheers,
Mandeep