I want to load all the files with a .txt extension into combobox...
So, far I can only choose the folder but can't load the files with .TXT extension into combo box...
Cheers...
Printable View
I want to load all the files with a .txt extension into combobox...
So, far I can only choose the folder but can't load the files with .TXT extension into combo box...
Cheers...
try looking at the example posted in this thread
Do you just want to get the names of the files into the combobox ?Quote:
Originally posted by wrack
I want to load all the files with a .txt extension into combobox...
So, far I can only choose the folder but can't load the files with .TXT extension into combo box...
Cheers...
yaap plenderj,
I just want to get the name of all .txt files in combobox...
Cheers...
VB Code:
Private Sub Form_Load() Dim myPath As String: myPath = "c:\" Dim myName As String: myName = Dir(myPath & "*.txt") Combo1.Clear Do While myName <> "" '' add just name, but with no path : '' Combo1.AddItem myName '' or add path AND name '' 'Combo1.AddItem myPath & myName myName = Dir Loop End Sub
ThX plenderj...