#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Path

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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Path

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)

"Stéphane Simard" wrote in message
...
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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Path

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

De*: "Bob Phillips"
Groupes*: microsoft.public.excel.programming
Date*: Tue, 10 Feb 2004 22:34:02 -0000
Objet*: Path

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)

"Stéphane Simard" wrote in message
...
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!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Path

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)

"Stéphane Simard" wrote in message
...
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

De : "Bob Phillips"
Groupes : microsoft.public.excel.programming
Date : Tue, 10 Feb 2004 22:34:02 -0000
Objet : Path

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)

"Stéphane Simard" wrote in message
...
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!






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Path Too Long? Not Anymore! Check out Long Path Tool Max Loger Excel Discussion (Misc queries) 1 March 24th 17 07:59 AM
http://CannotDeleteFile.net - Cannot Delete File? Try Long Path ToolFilename is too long? Computer Complaining Your Filename Is Too Long? TheLong Path Tool Can Help While most people can go about their businessblissfully unaware of the Windo Max Loger Excel Discussion (Misc queries) 0 June 14th 11 04:30 PM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
hyperlink navigation path path wrong in Excel 2003 CE Admin Excel Discussion (Misc queries) 5 January 7th 06 07:47 PM
how to change absolute path to relative path hwijgerse Excel Worksheet Functions 0 November 25th 05 07:18 AM


All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"