none
Pass color property via a text control RRS feed

  • Question

  •  able to change background color i.e.

    me.Textbox.backcolor = RGB(0, 255, 0)

    but type mismatch attempting to pass an RGB value via another text box

    me.TextBox.backcolor = me.OtherTextBox

    where the value of the other text box is displaying the string: RGB(0, 255, 0)

    not using conditional formatting for reasons too long to explain - am calling this selectable formatting...….

    not much experience in RGB color management....

    Saturday, December 15, 2018 10:30 PM

Answers

All replies

  • Try

    Me.TextBox.BackColor = Eval(Me.OtherTextBox)


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Saturday, December 15, 2018 10:46 PM
  • much thanks HV
    Saturday, December 15, 2018 10:54 PM
  • me.TextBox.backcolor = me.OtherTextBox

    where the value of the other text box is displaying the string: RGB(0, 255, 0)

    Hi msdn…,

    The string "" RGB(0, 255, 0)"" is just a string, and there is no connection to the function RGB.

    You can do some string maniulation to split off the three parameters for the colors, and pass them to the RGB function.

    Imb.

    Saturday, December 15, 2018 10:55 PM