By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,098 Members | 1,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,098 IT Pros & Developers. It's quick & easy.

PopulateCombo Box Row Source with list of files

P: n/a
I've been trying to find a simple way to populate the rowsource of a Combo
Box with the .mdb files in a folder.

Being a little "programatically challenged", I wanted to keep it as simple
as possible.

I've come up with the following. We're talkin' A97.

Can anyone see any problems that might arise using this method? Assume that
"path" = the path to the files.

Dim path as String
Dim MyFile As String
Dim MyList As String

MyFile = Dir(path & "*.mdb")

Do Until MyFile = ""
MyList = MyList
MyFile = Dir
MyList = MyList & MyFile & ";"

Me.Cmb1.RowSource = MyList
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
no, it should work fine. You might want to make it a bit more
flexible, though. You could use the BrowseFolderAPI to get the path
the easy way... (if it's not supposed to be static - if it is, it's a
moot point.)

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.