executing a openfiledialog box in

Posted on 2005-04-20
Last Modified: 2010-04-23
 can someone show me the open file dialog box execution thats tied with a button say button1_Onclick?

Question by:LuckyLucks
    LVL 13

    Accepted Solution

    Here's one that I used to open up a Crystal Report:

    Private Sub btnReportsOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReportsOpen.Click
            Dim dgrResult As DialogResult
            Dim myFile As String

            dlgOpen.InitialDirectory = Application.StartupPath & "\Reports"
            dlgOpen.Filter = ".rpt|*.rpt"
            dgrResult = dlgOpen.ShowDialog()
            If dgrResult <> DialogResult.Cancel Then
                myFile = dlgOpen.FileName
                rptTest.ReportSource = myFile
            End If
        End Sub

    LVL 69

    Assisted Solution

    by:Éric Moreau

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now