Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ed ed is offline
external usenet poster
 
Posts: 59
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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
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
Create a RowSource Depending on ComboBox Choice Blobbies Excel Discussion (Misc queries) 3 November 18th 07 01:22 AM
DropdownList/AutoFillUpList OssieMac Excel Discussion (Misc queries) 0 March 27th 07 11:58 PM
Create new series (on the same chart) for every change of values in a combobox uriel78 Charts and Charting in Excel 5 April 15th 05 12:08 AM
Create a new chart for every change of values in a combobox uriel78 Charts and Charting in Excel 2 April 6th 05 07:08 PM
Program a combobox/dropdownlist to create textboxes dynamically ed Excel Programming 0 October 30th 03 09:02 PM


All times are GMT +1. The time now is 07:34 PM.

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"