Announcement

Collapse
No announcement yet.

Unconfigured Ad Widget

Collapse

Loop Through Textboxes

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Loop Through Textboxes

    hi

    This code doesn't work. Is there a way to do something like this?
    The porpuse is to get the value from a textbox and put it in a cell.

    Code:
    For j = 1 To 10
                If j = 1 Then
                    txt = 25
                ElseIf j = 4 Then
                    txt = 57
                End If
                Range("G" & i + 8 + (2 * j)).Value = TextBox & txt & .Text
                Range("H" & i + 8 + (2 * j) + 1).Value = TextBox & txt + 1 & .Text
                Range("H" & i + 8 + (2 * j) + 2).Value = TextBox & txt + 2 & .Text
                Range("H" & i + 8 + (2 * j) + 3).Value = TextBox & txt + 3 & .Text
                txt = txt + 4       
    Next j
    thanks
    Last edited by Wigi; May 31st, 2007, 21:43.

  • #2
    Re: Loop Through Textboxes

    A small example sheet will be handy to get what you mean. Also, write it down in plain English, sentences understandable to all of us.
    Regards,

    Wigi

    Excel MVP 2011-2014

    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes

    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

    Comment


    • #3
      Re: Loop Beetwin Textbox

      HxF,

      If you are saying that you have information stored in text boxes that you have to retrieve on a regular basis, you need to think about not storing your data in text boxes so you don't have this problem.

      If you're saying you have a bunch of text boxes and you want to retrive the information once before you stop collecting data in text boxes, you could look at the link below. It may help you to understand how to loop through the text boxes.

      http://www.ozgrid.com/forum/showthread.php?t=31825

      Jim

      Comment


      • #4
        Re: Loop Beetwin Textbox

        Edit: Disregard. Bad logic written on the fly...

        Comment


        • #5
          Re: Loop Beetwin Textbox

          Thanks for the help.

          The link is very handy.

          thanks once again and I'm sorry for the bad english.

          Comment

          Trending

          Collapse

          There are no results that meet this criteria.

          Working...
          X