View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Phillips Phillips is offline
external usenet poster
 
Posts: 48
Default How to change color of buttons if pressed?

DOH!!!

..commandbuttonxx.background should have been .commandbuttonxx.backcolor
.....

Thanks
Phil


"Phillips" wrote in message
news:J_MBb.502919$Fm2.482326@attbi_s04...
How can I change the color of certain buttons if they get pressed?
I would "like" to use color NAMES (RED, GREEN, BLUE, BROWN etc)

I have tried to declare the name as public in my declarations, and then
assing a RGB value (like RED= "255,0,0") but this is the wrong type

Also, when I move to the NEXT record, I would like to reset the colors of
the buttons

I have gotten the original color to set with .commandbuttonxx.background =
RGB(125, 125,125), and I can change it when I press the button, but I can
not figure out where and what to put it in order to "RESTORE" when I move
from record to record. If I put it where I refresh my .textboxes , I get

an
error:
Compile Error: Method or data member not found (this is with out the . in
front) and if I do have the period in frount, I get a compile error:

Invalid
or unqualified reference


Thanks
Phil