Edit Boxes added recrussively(repeat- cant be that difficult

sameer_bhide

New Member
Joined
Mar 19, 2002
Messages
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
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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.
 
Upvote 0

Forum statistics

Threads
1,213,513
Messages
6,114,072
Members
448,546
Latest member
KH Consulting

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top