Edit Boxes added recrussively(repeat- cant be that difficult
Edit Boxes added recrussively(repeat- cant be that difficult
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Edit Boxes added recrussively(repeat- cant be that difficult

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    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.



User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com