Path

  • Thread starter Thread starter St=?ISO-8859-1?B?6Q==?=phane Simard
  • Start date Start date
S

St=?ISO-8859-1?B?6Q==?=phane Simard

I

Could you tell me how can i write this line to tell to Excel to open the
document "Doc" in volume where Excel actualy run?
In this exemple "MYHARDDRIVE"


Workbooks.Open Filename:="MYHARDDRIVE:Doc"

Thank you!
 
Stéphane,

Workbooks.Open Filename:= Application.Path & "\" & "Doc"

should do it

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
This will be save "Doc" in the folder of the application, no?

Me i want save it on the root of the drive.

in fact, i want know the name of actual drive.

Thank you
 
Sorry old bean, didn't deduce that from your post. Try this instead

myHardDrive = Left(Application.Path,2)
Workbooks.Open Filename:= myHardDrive & "\" & "Doc

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top