how do i make the file open prompt appear and then Text1.Text become the path to the file they selected?
Printable View
how do i make the file open prompt appear and then Text1.Text become the path to the file they selected?
How do "they" select the file?
with the open file prompt
put a commondialog on your form
VBCODE tags Kaput?Code:Private Sub Command1_Click()
With CommonDialog1
.InitDir = "C:\Windows"
.Filter = "Text Files|*.txt"
.CancelError = True
On Error GoTo UserCancelled
.ShowOpen
On Error GoTo 0
Text1 = .FileName
End With
UserCancelled:
End Sub
thanks