August 19th, 1999, 11:05 AM
How would I go about creating a Browse for File dialog box? I'm currenting using a Browse for Folder dialog box which works great but I have a need to browse for a file. I would like to be able to browse for a file and have the path and filename enter into a text box.
ehegarty
August 19th, 1999, 11:42 AM
Use the CommonDialog control to display the Standard Open dialog box.
Need to include component "Microsoft Common Dialog Control 5.0 "
'=======================================================================
' PROCEDURE : FileOpenProc()
' Purpose : Displays standard Open dialog box to find a file
' PARAMETERS : none
'=======================================================================
Public Sub FileOpenProc()
On Error Resume Next
Dim sFileName As String
FileOpenDialogBox = ""
CMDialog1.filename = ""
CMDialog1.ShowOpen
If Err <> 32755 Then ' User chose Cancel.
sFileName = CMDialog1.filename
End If
End Sub