Newbie Help ...Adding TextBoxes At RunTime 
Author Message
 Newbie Help ...Adding TextBoxes At RunTime

Can someone please explain the corect code to add x amount of textboxes at
runtime..ie

I have a varible called HowManyTextBoxes if this is set to 4 I would like 4
text boxes to appear on my form

Thanks in advance

Jason



Wed, 18 Jun 1902 08:00:00 GMT  
 Newbie Help ...Adding TextBoxes At RunTime

Make sure that your form contains the first control (one you want to
copy) and make sure it is indexed at 0

Option Explicit

Private Sub Form_Load()

    Dim ctl As Control
    Dim iStart As Integer
    Dim iCount As Integer

    iCount = 3
    For iStart = 1 To iCount
        Load txtLoadable(iStart)
    Next
    For iCount = 1 To txtLoadable.Count - 1
        txtLoadable(iCount).Top = txtLoadable(iCount - 1).Top +
txtLoadable(0).Height + 50
        txtLoadable(iCount).Visible = True
    Next

End Sub

Quote:
>Can someone please explain the corect code to add x amount of textboxes at
>runtime..ie

>I have a varible called HowManyTextBoxes if this is set to 4 I would like 4
>text boxes to appear on my form

>Thanks in advance

>Jason



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Adding textboxes checkboxes, etc. at Runtime

2. Adding Textboxes At Runtime

3. add/modify textboxes at runtime

4. Add textboxes during runtime

5. Adding textbox to a sstab contrrl at runtime

6. Adding TextBox Control at Runtime

7. HELP: Setting scroll bars for TextBox at runtime

8. *** HELP WITH TEXTBOX - CHANGING THE BACKGROUND COLOR AT RUNTIME ***

9. Changing TextBox.Text Property at Runtime- PLEASE HELP

10. Newbie : .findfirst runtime error 3251 help?

11. Newbie Needs Help on Textbox

12. Newbie needs help with TextBox

 

 
Powered by phpBB® Forum Software