View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dirk Diggler Dirk Diggler is offline
external usenet poster
 
Posts: 3
Default Simple Form: How to copy a value from one object to another?

thank you, guys! I tried to use Value property of TextBox1, and
mistakenly referenced the function.

thanks,
DD

Bob Flanagan wrote:
Dirk, you can do it like the following;

Private Sub CommandButton1_Click()
Dim sFile As String

sFile = Application.GetOpenFilename(FileFilter:= _
"TXT Files (*.txt), *.txt", FilterIndex:=1, _
Title:="Choose TXT File...")
If sFile < "False" Then
Me.TextBox1.Text = sFile
End If
End Sub