Button Colours

A

Alan

Hopefully a simpe question

Can I add colour to buttons ... Ie if negative value make it Red ... If zero
make it black etc ... Iknow I can change the font but can I change the entire
button colour ??

Many Thanks
 
W

Warrio

by code type:

if myValue <0 then
myButton.BackColor = vbRed 'or 255
elseif myValue=0 then
myButton.BackColor = 0 'or vbBlack
else
myButton.BackColor = vbGreen
end if

how ever you cannot have this effect if your button is placed into the
Detail section of continuous form.
your button have only one value, cause it is not bound to a record,
therefore, they will all have the same color.
 
M

Marshall Barton

Alan said:
Can I add colour to buttons ... Ie if negative value make it Red ... If zero
make it black etc ... Iknow I can change the font but can I change the entire
button colour ??


No, there is no simple answer.

If you'll hunt around on www.lebans.com you find a
complicated situation made easy to use.

OTOH, you can simulate a button using a label or text box
control without too much work.
 
Top