Results 1 to 3 of 3

Thread: [RESOLVED] creating textboxes

  1. #1

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    Resolved [RESOLVED] creating textboxes

    Hi,
    The easiest way of creating many textboxes is copy and paste them on the form...But What I want to know is if is it possible to create as many textboxes as I want using a loop...
    just one click of a command button...I want each textboxes controller to be next to the other
    thanks

    VB Code:
    1. Private Sub Command1_Click()
    2. Dim tb As Long
    3. Dim x As Integer
    4. tb = InputBox("how many textboxes do you want?")
    5. For x = 0 To tb
    6. 'here I am not sure what to write
    7. 'text1(tb).text
    8. Next x
    9. End Sub
    sorry I forgot to say.. I already have one textbox on the form and it has a controller array index num=0
    Last edited by merhaba; Mar 6th, 2006 at 12:22 PM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: creating textboxes

    This isn't precisely what you are asking for, but it does deal with creating controls dynamically and should get you started in the right direction.
    Attached Files Attached Files

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: creating textboxes

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width