+ Reply to Thread
Results 1 to 3 of 3

Label or TextBox numbers in loops

  1. #1
    Registered User
    Join Date
    02-15-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Label or TextBox numbers in loops

    I know this must have been answered but appologize for not knowing what to search for.
    I am using both Excel 2003 and 2007.
    I have many Labels and TextBoxes that need some chaning while running my macro.

    Is there a way to put something like this:

    If (PB_action = "page" Or PB_action = "boxlabel") Then
    Label10.ForeColor = RGB(0, valid, 0)
    End If

    in a For loop that runs from say 10 to 40 and will effectively make Label10 vary from Label10 to Label40?

    Thank you.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Label or TextBox numbers in loops

    Something like

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    02-15-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Label or TextBox numbers in loops

    Thank you Mr. mikerickson!
    I could not remember how to get that number into the string. I modified it just slightly because my Lables are on a worksheet.
    Please Login or Register  to view this content.
    I don't know how the SOLVED gets set but this solved my headache with 120 TextBox and Label items.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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