swmetal
Mechanical
- Oct 13, 2006
- 58
Hello
Trying to fill userform text box from a textfile with the selection from a command button. Can anyone help?
I've listed what I have below. Thanks
Private Sub cmdTest_Click()
Dim fso As New FileSystemObject
Dim Text As TextStream
Dim strTextPath As String
strTextPath = "C:\\Desktop\VariablesFolder\File.txt"
Set Text = fspenTextFile(strTextPath, ForReading)
txtTest.Text = Text.ReadAll
Text.Close
End Sub
Trying to fill userform text box from a textfile with the selection from a command button. Can anyone help?
I've listed what I have below. Thanks
Private Sub cmdTest_Click()
Dim fso As New FileSystemObject
Dim Text As TextStream
Dim strTextPath As String
strTextPath = "C:\\Desktop\VariablesFolder\File.txt"
Set Text = fspenTextFile(strTextPath, ForReading)
txtTest.Text = Text.ReadAll
Text.Close
End Sub