Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox Question

Status
Not open for further replies.

LinuxGuy

Programmer
Nov 18, 2002
37
US
How Can i Use a Combo Box in Excel To Only Show the Files in a directory with the Extension *.XLS ??? Please help
 
Dim fso As FileSystemObject, myfile As File
myCombo = myForm.Combobox1
Set fso = New FileSystemObject
myCombo.clear
For Each myfile In fso.GetFolder("c:\").Files
If right(myfile.Name,3) = "xls" then
myCombo.additem(myFile.name)
Next

HTH Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top