+ Reply to Thread
Results 1 to 3 of 3

Can a String (from concatenate) be converted to variable name?

  1. #1
    Registered User
    Join Date
    05-04-2013
    Location
    Pleasant Hill, CA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Can a String (from concatenate) be converted to variable name?

    Please Login or Register  to view this content.
    It would be really nice if I could use some function that would allow the following in place of above.

    Please Login or Register  to view this content.
    The TableX_Label variables are UserForm Labels. Just wondering if there was a way to accomplish this without a User Defined Collection or looping through UserForm objects. Maybe I'm looking for easier ways to do things when I should just use what I know and maybe I just lack a more in depth understanding of VBA but either way it seems like it would be useful to have some way to do this.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,615

    Re: Can a String (from concatenate) be converted to variable name?

    Try this...

    Please Login or Register  to view this content.
    The Controls collection is a collection of all the control objects in the UserForm. You can reference a specific control in the collection by string name or by index number.
    Last edited by AlphaFrog; 07-06-2013 at 11:43 PM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    05-04-2013
    Location
    Pleasant Hill, CA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Can a String (from concatenate) be converted to variable name?

    Wow! That is fantastic. Thanks so much!

+ 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