Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
populate a combobox with filenames in a specific folder
Hi all,
I'm trying to populate a combobox with the filenames I have saved to a specific folder. This folder only has excel files. I have tried several suggestions from the internet, but so far nothing has worked. Many thanks in advance, Sybolt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
populate a combobox with filenames in a specific folder
Hi,
Am Wed, 8 Jul 2015 05:37:50 -0700 (PDT) schrieb Roady Mayhem: I'm trying to populate a combobox with the filenames I have saved to a specific folder. This folder only has excel files. for an ActiveX combobox into the sheet: Sub Test() Dim objFSO As Object Dim objOrdner As Object Dim objDatei As Object Dim i As Integer 'Modify your path Const myPath = "E:\Excel_NG\Aktuell" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objOrdner = objFSO.GetFolder(myPath) With ActiveSheet.ComboBox1 For Each objDatei In objOrdner.Files .AddItem objDatei.Name Next End With End Sub Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Populate combobox with folder names | Excel Programming | |||
populate dropdown/combobox on userform with specific values from s | Excel Programming | |||
List Filenames from Folder | Excel Programming | |||
Look for a string in filenames in a folder? | Excel Programming | |||
Folder and filenames? | Excel Programming |