View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Passing Values From Command Buttons

Scott,

You can only do it with control commandbuttons, and you can do it from their
Click event procedure, setting the BackColor property to an RGB colour, not
ColorIndex.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Scott" wrote in message
...
How do I pass a value from a command button to a procedure?

Let's say I have four command buttons, one labeled "Red", "Green", "Brown"

and one labeled "Yellow".
Let's also say that I have a procedure named "ColorCell".

How do I get the procedure to color the cell appropriately depending on

which button is clicked?

Thank you,
Scott