Thread: locate drive
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default locate drive

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)


Curt wrote:

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


--

Dave Peterson