Display the Open dialog box. For this example create a form called Form1 whit one Command Button ca
Display the Open dialog box. For this example create a form called Form1 whit one Command Button called 'CmdOpen' and one Common dialog
Rate Display the Open dialog box. For this example create a form called Form1 whit one Command Button ca
(2(2 Vote))
Dim FileSelect
cdbOpenFile.CancelError = True
On Error GoTo errHandler
cdbOpenFile.Filter = "Text Files (*.txt)|*.txt| " & _
"Doc Files (*.doc)|*.doc| " & _
"All Files (*.*)|*.*| "
'Specify default file name to open
cdbOpenFile.FileName = ""
' Specify default filter to *.txt
cdbOpenFile.FilterIndex = 1
' Display the Open dialog box, and
' save the selected file in the
' variable FileSelect
cdbOpenFile.ShowOpen
FileSelect = cdbOpenFile.FileName
errHandler:
'User pressed the Cancel button
End Function
Private Sub CmdOpen_Click()
openfile
End Sub
Display the Open dialog box. For this example create a form called Form1 whit one Command Button ca Comments
No comments yet — be the first to post one!
Post a Comment