Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default How to change color of buttons if pressed?

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I change which cell becomes active when enter is pressed? scotpiper Excel Discussion (Misc queries) 1 April 7th 09 12:18 AM
In Excel can i change the color of the filter buttons (arrows)? rundogswim Excel Worksheet Functions 0 March 6th 08 09:43 PM
COMMAND BUTTONS and CELL COLOR hookfault Excel Discussion (Misc queries) 2 April 10th 06 11:43 PM
Multiple fill color buttons susielotus Excel Discussion (Misc queries) 1 February 5th 06 03:04 PM
changing the color of the buttons Mr. V Excel Discussion (Misc queries) 4 April 5th 05 02:57 PM


All times are GMT +1. The time now is 06:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"