ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Addressing the Excel file in which the macro is present. (https://www.excelbanter.com/excel-programming/280021-addressing-excel-file-macro-present.html)

neeraja

Addressing the Excel file in which the macro is present.
 
Hi,

I have an Excel file in which i have a Macro which uses
many different Excel files. How do I address the file in
which the Macro is present in my Macro. I am not
capturing the name of the file in which this macro is
present. So how can i address this file from my Macro??
Is there any command called This.excelfile or something??
pls let me know.

I would appreciate any help
Thanks,
Neeraja.

Charles Williams

Addressing the Excel file in which the macro is present.
 
Hi Neeraja,

You were very close: try

Thisworkbook.name

Charles
______________________
Decision Models
The Excel Calculation Site
www.DecisionModels.com

"neeraja" wrote in message
...
Hi,

I have an Excel file in which i have a Macro which uses
many different Excel files. How do I address the file in
which the Macro is present in my Macro. I am not
capturing the name of the file in which this macro is
present. So how can i address this file from my Macro??
Is there any command called This.excelfile or something??
pls let me know.

I would appreciate any help
Thanks,
Neeraja.





All times are GMT +1. The time now is 08:51 AM.

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