View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Stoodwalk Stoodwalk is offline
external usenet poster
 
Posts: 3
Default Opening File Browser

I do not want to open a file, I want to open a folder so
that a user may select a .pdf file or a word doc or
whatever. The content will vary from subject to subject I
just want to open a browser window at the desired path. A
dialog box will close as soon as you select a file, I want
a browser so it can stay open.

I do apologize for the confusion.
Thank you for your answer I do apreciate it.
-----Original Message-----
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.


.