Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate combobox with folder names damorrison Excel Programming 6 February 20th 10 01:33 PM
populate dropdown/combobox on userform with specific values from s sam Excel Programming 3 September 18th 09 12:31 AM
List Filenames from Folder Eskimo Excel Programming 1 May 19th 06 08:41 PM
Look for a string in filenames in a folder? FrigidDigit Excel Programming 2 May 24th 05 04:31 PM
Folder and filenames? Mark[_45_] Excel Programming 6 July 1st 04 03:49 AM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"