Can I make the list in my combo box a file directory? I save all my files in a specific folder and want to make the contents of that folder my list for the combo box. Any thoughts???
Can I make the list in my combo box a file directory? I save all my files in a specific folder and want to make the contents of that folder my list for the combo box. Any thoughts???
Hi
Here's something for you. The sub's input argument is the folder you want to list. Form1 and ComboBox1 are form and combobox names that need to be replaced.
[vba]Sub FileList_to_ComboBox(Fldr as String)
Dim sTemp As String
sTemp = Dir(Fldr & "*.*", vbNormal)
Do
If sTemp <> "." And sTemp <> ".." Then
Forms("Form1").Controls("ComboBox1").AddItem sTemp
End If
sTemp = Dir()
Loop Until sTemp = ""
End Sub
[/vba]
Jimmy
-------------------------------------------------
The more details you give, the easier it is to understand your question. Don't save the effort, tell us twice rather than not at all. The amount of info you give strongly influences the quality of answer, and also how fast you get it.