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
132 Views
Last Modified: 2010-05-02
How do I do this?

Thanks
0
Comment
Question by:sjmmajor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 250 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

Independent Software Vendors: 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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

687 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