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

navigating to a folder from vb

Status
Not open for further replies.

vaughn9

Technical User
Joined
Sep 23, 2001
Messages
183
I am using the code below to open a file from a vb command button. But now I need a command button to navigate to a folder so that that user can open the folder and select the file he wants. For eg. if I had a folder called Semetric on my server when the user click the vb button I need the user to be able to see the folder. What code should I use for this.

Dim wdApp As Word.Application

Set wdApp = New Word.Application
wdApp.Visible = True
wdApp.WindowState = wdWindowStateMaximize

wdApp.Documents.Open FileName:="\\server\Multilanguage.doc ", _ ConfirmConversions:= _
False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto


 
To browse to a file in a specific folder use the common dialog control, showopen method. Ypou will need to add this component to your project and then draw it on your form. There are plenty of examples in the help files. Thanks and Good Luck!

zemp
 
Vaughn9,

Have you tried the Microsoft Common Dialog Control? You have to add the component to your toolbox before you can use it. Go to Project->Components, and select the Microsoft Common Dialog Control.

Good Luck

Elena
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top