ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Pick up file from specific location (https://www.excelbanter.com/excel-discussion-misc-queries/172427-pick-up-file-specific-location.html)

Mandeep Dhami

Pick up file from specific location
 
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


Gary''s Student

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


Mandeep Dhami

Pick up file from specific location
 
Thanks Gary's Student....your suggestion helped me.

"Gary''s Student" wrote:

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



All times are GMT +1. The time now is 03:48 AM.

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