+ Reply to Thread
Results 1 to 5 of 5

loop using references to controls in userform values

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    loop using references to controls in userform values

    HI i have a loop question relating to controls in userforms.

    I am trying to loop through text boxes names bridge1 bridge 2 etc up to 9.

    WHat i want is to ascertain the value of each textbox and then place that value in a totaltxtbox1 to 9.

    I canhard code it but was hoping for a loop my problem is i keep getting mismatch error when i type :

    Please Login or Register  to view this content.
    Any thoguhts greatly appreciated.

    I have simplified the issue above but a solution to the above will give me aswer to problem

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: loop using references to controls in userform values

    Untested but try this. I have guessed your intent as pasted code doesn't quite make sense.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: loop using references to controls in userform values

    Thanks for quick reply. Sadly your code doesnt generate the correct value. It keeps generating a 0.

    If i did

    Please Login or Register  to view this content.
    I would get the correct result but obviously no loop ability if i do that.

    Any thoughts would be greatly appreciated

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: loop using references to controls in userform values

    Works for me. You only need one line of course
    Please Login or Register  to view this content.
    Perhaps post a workbook?

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: loop using references to controls in userform values

    Hi again. yep working for me now. many thanks for your help. reputation added.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. "Invalid use of ME keyword" when trying to loop through all userform controls
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2012, 03:10 AM
  2. Check Userform controls for identical values
    By Newbie_Nick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-23-2010, 01:44 PM
  3. loop controls in userform except one textbox
    By gkisacik in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-28-2010, 04:30 AM
  4. Loop through controls in UserForm
    By JezLisle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2009, 05:38 AM
  5. Save UserForm controls values?
    By Dr.Ile in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2007, 05:32 PM

Tags for this Thread

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1