View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
dlookup[_2_] dlookup[_2_] is offline
external usenet poster
 
Posts: 1
Default Using path instead of drive letter

Yes.
If it is on a server then replace the "C:\"
with "\\server name\.
if your server name is 'ahfctor01' then:
Workbooks.Open Filename:="\\ahfctor01
\Data\Excel\BARModel\BranchMaster.xls"

If the file is on your workstation and not the server
the file has to be in a shared folder. i.e.

Workbooks.Open Filename:="\\your workstation's
name\Shared folder name\BranchMaster.xls"

if you share the 'BARModel' folder using its name and if
your workstation's name is 'ahfctor01' then it would be:
Workbooks.Open Filename:="\\ahfctor01
\BARModel\BranchMaster.xls"

-----Original Message-----
Hi-

is there any way to write below code without the drive

letter so that users who have a network drived mapped to
different drive letters will always be able to open it?
For instance, I have a shared drive named ahfcsharedfiles
on 'ahfctor01'.

Workbooks.Open

Filename:="C:\Data\Excel\BARModel\BranchMaster.xls "

Thanks!

.