+ Reply to Thread
Results 1 to 6 of 6

how to give textboxes the same interior color?

  1. #1
    Registered User
    Join Date
    08-02-2011
    Location
    stavanger, norway
    MS-Off Ver
    Excel 2003
    Posts
    29

    how to give textboxes the same interior color?

    Hi, I need some help defining colors of my textboxes.
    I have 7 textboxes, named 'txtFbRating' and a number from 1 to 7 behind this name.
    (txtFbRating1, txtFbRating2 etc)
    I want to have the interiorcolor to change with the value within the textbox. Values from 1 to 9
    For example, if the value is 3, I want the interiorcolor to be RGB(240, 100, 25).

    I've tried to code it, but it won't work, can someone help me out here?
    here's what I've tried:
    Please Login or Register  to view this content.
    regards, Trudie
    Last edited by impartrudie; 11-01-2011 at 03:48 AM.

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: how to give textboxes the same interior color?

    hi
    just try this one...
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: how to give textboxes the same interior color?

    The colouring of objects in a userform is different from that of cells in a worksheet.
    This macro has to be put into the userform's macromodule.

    Please Login or Register  to view this content.
    Last edited by snb; 11-01-2011 at 05:50 AM.



  4. #4
    Registered User
    Join Date
    08-02-2011
    Location
    stavanger, norway
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: how to give textboxes the same interior color?

    Hi Snb and John55,

    It seems neither of your proposals works...
    Snb, could you explain your code? what does this line of code do?:
    Please Login or Register  to view this content.
    thanks, Trudie

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: how to give textboxes the same interior color?

    cfr. the attachment
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-02-2011
    Location
    stavanger, norway
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: how to give textboxes the same interior color?

    hardstikke bedankt!,
    ik probeer uit te vogelen hoe het in elkaar steekt, maar snap nog steed de kleurkodering niet - hoe hangt deze samen met de value?
    regards,
    Trudie

+ 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