Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default Path for shellapplication.BrowseForFolder?? 1

Status
Not open for further replies.

waldemar

Programmer
Nov 15, 2001
245
DE
Hi!
I am using this function to open the standard browse-folder dialog... Does anyone know how I can set a default directory in which the browsing starts?

Thanks in advance
waldemar



Function findFolder() As String
Dim shellapplication As Object
Dim folder As Object
Dim optns As Integer

Set shellapplication = CreateObject("Shell.Application")

If Instructions = "" Then Instructions = "Select Folder"
optns = IIf(ShowEditBox, 17, 1)
Set folder = shellapplication.BrowseForFolder(hWndAccessApp, Instructions, optns)
If folder Is Nothing Then
findFolder = ""
Else
findFolder = folder.Self.Path
End If

Set shellapplication = Nothing
Set folder = Nothing
End Function

 
I don't know if this helps but this is what I use.

BrowsFolder = Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE " & "YOUR FILE PATH", vbNormalFocus

YOUR FILE PATH= the path to the folder you would like to open.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top