Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 5 of 5

Thread: Loop Through Textboxes

  1. #1
    Join Date
    30th August 2006
    Posts
    35

    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.

    VB:
    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 at 21:43.

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    15th August 2005
    Location
    Mechelen, Belgium
    Posts
    6,006

    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, 2012, 2013



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

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

  3. #3
    Join Date
    9th June 2006
    Location
    The best city, in the best state, in the best country, in the known inhabited universe, Houston, TX
    Posts
    966

    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

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    11th August 2006
    Location
    Outside St. Louis, MO
    Posts
    621

    Re: Loop Beetwin Textbox

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

    Excel Video Tutorials / Excel Dashboards Reports


  5. #5
    Join Date
    30th August 2006
    Posts
    35

    Re: Loop Beetwin Textbox

    Thanks for the help.

    The link is very handy.

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

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Loop Through UserForm Textboxes
    By weezybaby in forum EXCEL HELP
    Replies: 1
    Last Post: June 7th, 2008, 09:24
  2. Loop UserForm Textboxes & Copy To Cells
    By llamadon in forum EXCEL HELP
    Replies: 2
    Last Post: March 28th, 2008, 23:21
  3. Replies: 3
    Last Post: February 7th, 2008, 08:42
  4. Replies: 7
    Last Post: September 1st, 2006, 08:32
  5. Loop Through TextBoxes by Name and Variable Value
    By msunardi in forum EXCEL HELP
    Replies: 8
    Last Post: December 1st, 2004, 18:20

Bookmarks

Posting Permissions

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