I am using VB6 and am trying to set the back colour or a label to a hexidecimal number that a user enteres into a textbox, (so they can preview their colour).
using the syntax label.backcolour = rgb(123,123,123) all works fine as you would expect.
However trying to set the backcolour to a hex value from a text box fails due to the value being a string.
Am i being think, how do i go about doing this?
Currently have tried
label.backcolor = txthex.text
label.backcolor = val(txthex.text)
label.backColour = clng(txthex.text)
label.backColour = cint(txthex.text)
anyone got any ideas?
using the syntax label.backcolour = rgb(123,123,123) all works fine as you would expect.
However trying to set the backcolour to a hex value from a text box fails due to the value being a string.
Am i being think, how do i go about doing this?
Currently have tried
label.backcolor = txthex.text
label.backcolor = val(txthex.text)
label.backColour = clng(txthex.text)
label.backColour = cint(txthex.text)
anyone got any ideas?