Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to create a dynamic Userform via VBA
Hi,
I'd like to create a dynamic userform which can vary the number of inputs depending on the user. A userform will be displayed with 1 textbox to enter their car model. There will be a command button that will allow the user to 'add' more textboxes if they have more cars. Of course I will be placing a limit on the number of cars a person can enter! =) So my first question would be: is there code which will allow me to resize the userform (eg widen by x lines/pixels/whatever) as the user adds textboxes? My second question is: is there a relatively simple piece of code which will allow me to add a textbox, say, directly below the one above (maybe with some space in between)? Thanks very much. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to create a dynamic Userform via VBA
Userform has height and width properties.
Look in help at controls.Add the bottom of the first textbox sepval = 10 Textbox2.Top = Textbox1.Top + textbox1.Height + sepval -- Regards, Tom Ogilvy SuperJas wrote in message ... Hi, I'd like to create a dynamic userform which can vary the number of inputs depending on the user. A userform will be displayed with 1 textbox to enter their car model. There will be a command button that will allow the user to 'add' more textboxes if they have more cars. Of course I will be placing a limit on the number of cars a person can enter! =) So my first question would be: is there code which will allow me to resize the userform (eg widen by x lines/pixels/whatever) as the user adds textboxes? My second question is: is there a relatively simple piece of code which will allow me to add a textbox, say, directly below the one above (maybe with some space in between)? Thanks very much. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can a Combobox in a Userform access multiple dynamic tables | Excel Discussion (Misc queries) | |||
Create Calucated Field in a Userform | Excel Discussion (Misc queries) | |||
coping and create new userform | Excel Discussion (Misc queries) | |||
Create and show UserForm from Add-In | Excel Programming | |||
Dynamic Text boxes in UserForm | Excel Programming |