L
LEU
Is there an easer way to upload a text file into a form than what I have
written below. Some of my forms are rather large.
Dim tempfile
Dim bk1, bk2, bk3, bk4
ChangeFileOpenDirectory "C:\History\"
With Dialogs(wdDialogFileOpen)
If .Display = -1 Then
Application.DefaultSaveFormat = "Text"
tempfile = .Name
Open tempfile For Input As #1
Input #1, bk1, bk2, bk3, bk4
Cmd1.Value = bk1
Cmd2.Value = bk2
Text1.Value = bk3
Text2.Value = bk4
Close #1
End If
End With
written below. Some of my forms are rather large.
Dim tempfile
Dim bk1, bk2, bk3, bk4
ChangeFileOpenDirectory "C:\History\"
With Dialogs(wdDialogFileOpen)
If .Display = -1 Then
Application.DefaultSaveFormat = "Text"
tempfile = .Name
Open tempfile For Input As #1
Input #1, bk1, bk2, bk3, bk4
Cmd1.Value = bk1
Cmd2.Value = bk2
Text1.Value = bk3
Text2.Value = bk4
Close #1
End If
End With