ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook.Path (https://www.excelbanter.com/excel-programming/369685-workbook-path.html)

fred

Workbook.Path
 
The workbook I am working with is not stored on my local PC's drive but is
filed on a server. When I use Workbook.Path it returns my local drive letter
(e.g. G:\temp). Of course the letter is different for different user. How
can I convert this path to a path with the server name (e.g.
\\Server01\temp).

Thanks for your help
Fred



NickHK

Workbook.Path
 
Fred,
http://vbnet.mvps.org/code/network/u...appeddrive.htm

NickHK

"Fred" <leavemealone@home wrote in message
...
The workbook I am working with is not stored on my local PC's drive but is
filed on a server. When I use Workbook.Path it returns my local drive

letter
(e.g. G:\temp). Of course the letter is different for different user. How
can I convert this path to a path with the server name (e.g.
\\Server01\temp).

Thanks for your help
Fred





Gary Keramidas

Workbook.Path
 
you can use something like this

dim fpath as string
fPath = ThisWorkbook.Path & "\"

on my server for example, ifpath will return this:

N:\My Documents\Excel\
--


Gary


"Fred" <leavemealone@home wrote in message
...
The workbook I am working with is not stored on my local PC's drive but is
filed on a server. When I use Workbook.Path it returns my local drive letter
(e.g. G:\temp). Of course the letter is different for different user. How can
I convert this path to a path with the server name (e.g. \\Server01\temp).

Thanks for your help
Fred





fred

Workbook.Path
 
Thanks Nik, that worked fine.

Fred

"NickHK" wrote in message
...
Fred,
http://vbnet.mvps.org/code/network/u...appeddrive.htm

NickHK

"Fred" <leavemealone@home wrote in message
...
The workbook I am working with is not stored on my local PC's drive but
is
filed on a server. When I use Workbook.Path it returns my local drive

letter
(e.g. G:\temp). Of course the letter is different for different user. How
can I convert this path to a path with the server name (e.g.
\\Server01\temp).

Thanks for your help
Fred








All times are GMT +1. The time now is 02:06 PM.

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