?
Solved

I have a VB6 app that I want to add the ability to view a network folder and open a document when selected.

Posted on 2004-09-01
4
Medium Priority
?
138 Views
Last Modified: 2010-05-02
How do I do this?

Thanks
0
Comment
Question by:sjmmajor
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 1000 total points
ID: 11958884
The fastest way is to use the CommonDialog control.  Add it to your project and then use something like this:

Private Sub OpenFile_Click()
    'Restrict the file type to text files *.txt
    CommonDialog1.Filter = "Text (*.txt)|*.txt"
    'Display the dialog box
    CommonDialog1.ShowOpen
    'If the user chose a file
    If CommonDialog1.FileName <> "" Then
        'Open the file (I can't be more specific without knowing what you plan to do with the file)
    End If
End Sub
0
 
LVL 10

Expert Comment

by:anv
ID: 11960508
0
 
LVL 76

Expert Comment

by:David Lee
ID: 12561449
Accept BlueDevilFan.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question