Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

API fill text box from text file

Status
Not open for further replies.

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 = fso_OpenTextFile(strTextPath, ForReading)

txtTest.Text = Text.ReadAll

Text.Close

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor