I want to open a txt file and place the contents of that textfile into c aombo box. I am having some trouble because there is not an additem method. Here is my code so far.
Private Sub AdditionalAccounts_GotFocus()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim Item As String
Dim Account As String
Dim FileName As String
Dim Drive As String
Drive = "c:\"
FileName = AccountNum.Value
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(Drive & FileName & ".txt", ForReading, TristateFalse)
Do Until EOF(1) = True
Input #1, Item
cboAccountNum
Loop
f.Close
End Sub
Please help, im stuck
Thanks in advance
Private Sub AdditionalAccounts_GotFocus()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim Item As String
Dim Account As String
Dim FileName As String
Dim Drive As String
Drive = "c:\"
FileName = AccountNum.Value
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(Drive & FileName & ".txt", ForReading, TristateFalse)
Do Until EOF(1) = True
Input #1, Item
cboAccountNum
Loop
f.Close
End Sub
Please help, im stuck
Thanks in advance