We have a fax template. One of the combo boxes lists company names. These are picked up from the names of text files in an explorer folder. Would it be possible to direct the code to an excel file called c:textcompanynames.xls with the names typed in column A. So I would have one file rather than a folder of files.
The code used at present is
‘This subroutine is called when the form is first opened and it populates the drop list
‘with the company names held in the text file folder.
P = “c:text*.txt”
F = Dir(P)
Do
‘loop through populating the drop list with the names of the address files minus the “.txt” on the end.
F = Left(F, Len(F) – 4)
cboCompany.AddItem F
F = Dir()
If F = “” Then
Exit Do
End If
Loop
End If
Many thanks
Roberta