Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
Can a Combobox in a Userform access multiple dynamic tables JackyJ Excel Discussion (Misc queries) 0 August 15th 10 01:19 AM
Create Calucated Field in a Userform robinsn Excel Discussion (Misc queries) 0 July 24th 10 03:28 PM
coping and create new userform ASU Excel Discussion (Misc queries) 0 July 25th 06 12:54 PM
Create and show UserForm from Add-In Rick Knight[_2_] Excel Programming 3 December 9th 03 01:04 AM
Dynamic Text boxes in UserForm Kelley[_2_] Excel Programming 2 November 18th 03 05:59 PM


All times are GMT +1. The time now is 03:57 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"