Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Help please! I've been trying to find the right code to do the following but I just can't seem to find the right thing. OK, I have created a combo box as a user form. The combo box needs to be populated with several folders found in the same location, let's say c:\projects Then the user will have to click on one of those folders which contain text files. So, I think I will need a subfolder in the combo box which will display those files and finally the user will click on one of them. Is this possible on just one combo box or do I need two combo boxes linked to each other? Any help with the code would be greatly appreciated, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See if this helps
Sub Fillcombobox() Do fileToOpen = Application _ .GetOpenFilename("Text Files (*.txt), *.txt") If fileToOpen < False Then 'Open file and 'Load you combobox here End If Msg = "Do you want to load Combobox with another file?" Response = MsgBox(Msg, vbYesNo, "Get Data") Loop While Response = vbYes End Sub "uwe" wrote: Hi, Help please! I've been trying to find the right code to do the following but I just can't seem to find the right thing. OK, I have created a combo box as a user form. The combo box needs to be populated with several folders found in the same location, let's say c:\projects Then the user will have to click on one of those folders which contain text files. So, I think I will need a subfolder in the combo box which will display those files and finally the user will click on one of them. Is this possible on just one combo box or do I need two combo boxes linked to each other? Any help with the code would be greatly appreciated, |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sep 11, 1:34*am, Joel wrote:
See if this helps Sub Fillcombobox() Do * *fileToOpen = Application _ * * * .GetOpenFilename("Text Files (*.txt), *.txt") * *If fileToOpen < False Then * * * 'Open file and * * * 'Load you combobox here * *End If * *Msg = "Do you want to load Combobox with another file?" * *Response = MsgBox(Msg, vbYesNo, "Get Data") Loop While Response = vbYes End Sub "uwe" wrote: Hi, Help please! I've been trying to find the right code to do the following but I just can't seem to find the right thing. OK, I have created a combo box as a user form. The combo box needs to be populated with several folders found in the same location, let's say c:\projects Then the user will have to click on one of those folders which contain text files. So, I think I will need a subfolder in the combo box which will display those files and finally the user will click on one of them. Is this possible on just one combo box or do I need two combo boxes linked to each other? Any help with the code would be greatly appreciated,- Hide quoted text - - Show quoted text - I am working with 2 listBoxes now and the files I would like to populate have the extension .JAE and they are located in C:\Projects. The first listBox should populate all fileNames with that extension in that folder. Selecting one of the populated fileNames should start Marcro1, which I already have and it writes that file into an Excel workbook. The second listbox should populate the columns B and C, out of that workbook. Selection of one of the populated values should start Macro2. I have already both macros, they are working fine if I start them from Excel. Hope you can help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Populate text box or combo box with external files with links to file names | Links and Linking in Excel | |||
How to populate Combo Box ?? | Excel Programming | |||
Populate one combo box based on the selection of another combo box | Excel Programming | |||
Populate a combo box | Excel Discussion (Misc queries) | |||
How do I import external data populate rows instead of columns. | Excel Discussion (Misc queries) |