ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   I hate paths! (https://www.excelbanter.com/excel-discussion-misc-queries/137885-i-hate-paths.html)

Ross[_2_]

I hate paths!
 
Could someone please tell me how to indicate current path in VBA when using
Excel? When I record a macro usinly excel, for example in haveing anothe
workbook open, it always includes the full path. What I want is for the
Workbook to be opened in the current directory, so I can move this directory
to other computers and have it the macro work without having to change paths
at each new machine. I tried ./, but that didn't work for me.
Ross



Ron de Bruin

I hate paths!
 
See VBA help for CurDir



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ross" wrote in message ...
Could someone please tell me how to indicate current path in VBA when using
Excel? When I record a macro usinly excel, for example in haveing anothe
workbook open, it always includes the full path. What I want is for the
Workbook to be opened in the current directory, so I can move this directory
to other computers and have it the macro work without having to change paths
at each new machine. I tried ./, but that didn't work for me.
Ross



Ron de Bruin

I hate paths!
 
I think you are looking for Thisworkbook.Path after reading your other thread

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ron de Bruin" wrote in message ...
See VBA help for CurDir



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ross" wrote in message ...
Could someone please tell me how to indicate current path in VBA when using
Excel? When I record a macro usinly excel, for example in haveing anothe
workbook open, it always includes the full path. What I want is for the
Workbook to be opened in the current directory, so I can move this directory
to other computers and have it the macro work without having to change paths
at each new machine. I tried ./, but that didn't work for me.
Ross




All times are GMT +1. The time now is 04:29 PM.

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