Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program a combobox/dropdownlist to create
Hi all,
I want to Program a combobox/dropdownlist to create textboxes dynamically. A user simply selects a number from a combobox, say from 1- 10 and this creates a corresponding number of label and textboxes. Thanks Edward .. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program a combobox/dropdownlist to create
Where are these located?
Where do you want them created? ActiveX controls or Forms controls? -- Regards, Tom Ogilvy ed wrote in message ... Hi all, I want to Program a combobox/dropdownlist to create textboxes dynamically. A user simply selects a number from a combobox, say from 1- 10 and this creates a corresponding number of label and textboxes. Thanks Edward . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program a combobox/dropdownlist to create
Sorry, I left out pertinent information.
I want these controls created on a user form as form controls. Thanks Ed -----Original Message----- Where are these located? Where do you want them created? ActiveX controls or Forms controls? -- Regards, Tom Ogilvy ed wrote in message ... Hi all, I want to Program a combobox/dropdownlist to create textboxes dynamically. A user simply selects a number from a combobox, say from 1- 10 and this creates a corresponding number of label and textboxes. Thanks Edward . . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Program a combobox/dropdownlist to create
Instead of adding them, you could just design them in and hide them. Then after
you get the value from the user, just unhide the ones you want. Option Explicit Private Sub ComboBox1_Change() Dim iCtr As Long For iCtr = 1 To 10 Me.Controls("textbox" & iCtr).Visible _ = CBool(iCtr <= CLng(Me.ComboBox1.Value)) Next iCtr End Sub Private Sub UserForm_Initialize() Dim iCtr As Long For iCtr = 1 To 10 Me.Controls("textbox" & iCtr).Visible = False Me.ComboBox1.AddItem iCtr Next iCtr End Sub I put 10 textboxes in the userform. They were named textbox1 thru textbox10--so the code would work. wrote: Sorry, I left out pertinent information. I want these controls created on a user form as form controls. Thanks Ed -----Original Message----- Where are these located? Where do you want them created? ActiveX controls or Forms controls? -- Regards, Tom Ogilvy ed wrote in message ... Hi all, I want to Program a combobox/dropdownlist to create textboxes dynamically. A user simply selects a number from a combobox, say from 1- 10 and this creates a corresponding number of label and textboxes. Thanks Edward . . -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a RowSource Depending on ComboBox Choice | Excel Discussion (Misc queries) | |||
DropdownList/AutoFillUpList | Excel Discussion (Misc queries) | |||
Create new series (on the same chart) for every change of values in a combobox | Charts and Charting in Excel | |||
Create a new chart for every change of values in a combobox | Charts and Charting in Excel | |||
Program a combobox/dropdownlist to create textboxes dynamically | Excel Programming |