locate drive

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Have code that looks for a file in (C:\) example open C:\ word.doc problem is
if a person places the folder with all files on another drive there is
conflick. Lack knowledge as to how to have the C be any drive. Can it be done?
Appreciate help
Thanks
 
There are lots of drive letters you'd have to search through (26 approximately
<bg>).

I think I'd look on the preferred location (C:\folder\folder\word.doc), and if
not found, I'd ask the user.

Jim Rech has a BrowseForFolder routine at:
http://www.oaltd.co.uk/MVP/Default.htm
(look for BrowseForFolder)

John Walkenbach has one at:
http://j-walk.com/ss/excel/tips/tip29.htm

If you and all your users are running xl2002+, take a look at VBA's help for:
application.filedialog(msoFileDialogFolderPicker)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top