All pastes #476626 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-08 07:15 UTC
rendered paste body
        Dim strFileName As String
        Dim ret As DialogResult

        OpenFD.InitialDirectory = "C:\"
        OpenFD.Title = "Open a Text File"
        OpenFD.Filter = "Text Files(*.txt)|*.txt|Word Files(*.doc)|*.doc"
        ret = OpenFD.ShowDialog

        strFileName = OpenFD.FileName


        If ret = Windows.Forms.DialogResult.Cancel Then
            MsgBox("Cancel Button Clicked")
        Else
            MsgBox(strFileName)
        End If