+ Reply to Thread
Results 1 to 5 of 5

loop through concatenated object names and variables

  1. #1
    Registered User
    Join Date
    12-30-2009
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    43

    loop through concatenated object names and variables

    So I have the following code which works:

    Please Login or Register  to view this content.
    I'd like to simplify this but can't seem to figure out how. So far I have the following code which DOES NOT work.

    Please Login or Register  to view this content.
    Any help would be appreciated, thanks.
    Last edited by TYork; 06-24-2010 at 04:32 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,717

    Re: loop through concatenated object names and variables

    I think something like this should work but to test it out I would need to know where are your text boxes--in a worksheet, or on a form? And are you using ActiveX or Form controls?

    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 06-24-2010 at 02:54 PM. Reason: changed declaration from Control to Object
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    12-30-2009
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: loop through concatenated object names and variables

    The textboxes are on a userform and I am using activex controls.

  4. #4
    Registered User
    Join Date
    12-30-2009
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: loop through concatenated object names and variables

    Your original code works, although "Range()" need to be removed from around "Calculations!AG" & i + 1

    Thanks for your help

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,717

    Re: loop through concatenated object names and variables

    Quote Originally Posted by TYork View Post
    Your original code works, although "Range()" need to be removed from around "Calculations!AG" & i + 1

    Thanks for your help
    Sorry for the glitch. I did a generic test and not one exactly like your situation. I edited my code afterwards to put that in. Glad you were able to work around it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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