![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 2
|
This one must be really tough (I got no replies from it when I posted it a couple of weeks back)
Well here goes the problem again I want to build a form which shows two edit boxes to start with Say Name 1 : Edit box Name 2 : Edit box Once I enter something in Edit box 1 (which has the lable Name 1 befor it) and go to Edit box 2, a new edit box Name 3 : Edit box gets added , Once I enter in to Edit box 3, the next gets added, this process continues for another two or three boxes and then a vertical scroll box appears which lets you scroll down to say thiry boxes. To get an idea of what I mean you can try using say the Sum function through the Insert > Function etc. Here you get Edit boxes for two numbers and then as you enter one number in one edit box and go to the next a new edit box gets added followed by a vertical scroll box after four boxes get displayed and then this vertcical scroll bar lets you scroll through about 30 boxes. This is exactly what I want to achieve on my user form. I would greatly appreciate if you can help me out with this TIA Sam |
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Sam
This is very easy to do, but I wouldn't advise over-complicating things by adding/Removing TextBox Controls as 'Run-Time. Instead put all 30 Textbox controls on a userform, then shrink it down so that onlt the top one is showing. Now simply add some code like below to each TextBox Private Sub TextBox1_Enter() Me.Height = Me.Height * 1.1 End Sub Just use a bit of 'trial and error' to get the correct percentage increase. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|