Button Colours

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top