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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening windows explorer to a specified directory from a button

Status
Not open for further replies.

ckennerdale

Programmer
Dec 23, 2000
158
GB
Hi
I have a button which I have used to open explorer.exe. I want this to open to a specifed folder on a netwrok drive

by default it opens into 'My Documents'

How can I specify the folder (sorry I know is probably a really basic question)

My Code-

Private Sub View_Folder_Button_Click()
On Error GoTo Err_View_Folder_Button_Click

Dim stAppName As String

stAppName = "C:\WINNT\explorer.exe"
Call Shell(stAppName, 1)

Exit_View_Folder_Button_Click:
Exit Sub

Err_View_Folder_Button_Click:
MsgBox Err.Description
Resume Exit_View_Folder_Button_Click

End Sub
Caspar Kennerdale







Caspar Kennerdale
 
You asked this in another forum. Please don't crosspost. It only leads to people wasting their time answering questions in two forums.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top