View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Fill color in shape

Modify the mcro as below

'If you are using a shape from the drawing toolar.
'You need to edit the shape name which is given as 'Rectangle 1'. Click on
the shape to know the shape name displayed in the named box (box above cell
A1)
Sub Macro()
ActiveSheet.Shapes("Rectangle 1").Fill.ForeColor.SchemeColor = 15
'your code

ActiveSheet.Shapes("Rectangle 1").Fill.ForeColor.SchemeColor = 65
End Sub

OR

'If you are using a command button from the control toolbox
Sub Macro()
Activesheet.CommandButton1.BackColor = vbYellow
'your code

Activesheet.CommandButton1.BackColor = &H8000000F
End Sub



If this post helps click Yes
---------------
Jacob Skaria


"Terje" wrote:

I am using a shape as a button in form controls, I have assigned a macro to
this shape to change a set of data. How can I get the shape to change fill
color when running this macro?