View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Opening File Browser

I think the usual way of doing this is to change to the desired drive and
folder and then use GetOpenFilename:

Sub a()
Dim FName As Variant
ChDrive "D"
ChDir "\download"
FName = Application.GetOpenFilename("Excel files (*.xls),*.xls")
If FName < False Then Workbooks.Open FName
End Sub

You'd have to take the path info and put it into the first two lines above.
--
Jim Rech
Excel MVP

"Stoodwalk" wrote in message
...
|I would like to open a normal Folder (Not a file) in VBA
| for browsing files from a path contructed from an array.
| If I put path in a cell as a hyperlink I can click on it
| and the folder will open. If I try to open the folder fron
| a macro I get errors.
|
| I've tried:
| Worksheets("SheetName").Range("A2").Hyperlink.Foll ow
| NewWindow:=True
|
| I get:
| Object doesn't support this property or method
|
| What I am trying to do, is allow a user to open a folder
| based on a subject, direct them to the appropriate folder
| that contains files pertaining to the subject and allow
| them to choose the document they wish.