variables in textboxes?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: variables in textboxes?

  1. #1
    Join Date
    Jan 2010
    Posts
    17

    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)
    Code:
    dim mynum(0-10) as Integer
    ?dim textbox(0-10) ???
    dim varnum as int
    varnum = 0
    
    
    Do
        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
    Location
    NW USA
    Posts
    173

    Re: variables in textboxes?

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

  3. #3
    Join Date
    Jan 2010
    Posts
    17

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center