CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2010

    variables in textboxes?

    it would save me a lot of lines if I could just loop every time i needed to fill all the text boxes

    for ex (not actual code)
    dim mynum(0-10) as Integer
    ?dim textbox(0-10) ???
    dim varnum as int
    varnum = 0
        mynum(varnum) = 11
        Textbox(varnum).Text = mynum(varnum)
    varnum += 1
    loop until varnum = 10
    something like that so I don't have to keep typing out
    TextBox1.Text = 10
    TextBox2.Text = 10

    every time I want to fill all the textboxes

    any help?

    .Net version 4.0

    Thanks again for all the help you guy's have given me!

  2. #2
    Join Date
    Aug 2009
    NW USA

    Re: variables in textboxes?

    Me.Controls("TextBox" & varnum.ToString).Text = "Hi"

  3. #3
    Join Date
    Jan 2010

    Re: variables in textboxes?

    Kick butt! thank you =D here have a cookie ^.^ lol
    but seriously, thank you

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

By using this site, you agree to the Privacy Policy