Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have written a macro that changes the color of a shape (rectangle 1) when I press on my shape. I assign the macro to that shape. I the macro I have : ActiveSheet.shapes("rectangle 1").select if Selection.shaperange.fill....etc. then end if Now I want to assign this macro to run on any other shapes in my sheet. But it only execute for shapes("rectangle 1"). Any suggestion? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gwen,
Try something like: '===================== Public Sub ToggleColor() With ActiveSheet.Shapes(Application.Caller).Fill.ForeCo lor If .SchemeColor = 4 Then .SchemeColor = 3 Else .SchemeColor = 4 End If End With End Sub '<<===================== --- Regards, Norman "Gwen" wrote in message . .. Hello, I have written a macro that changes the color of a shape (rectangle 1) when I press on my shape. I assign the macro to that shape. I the macro I have : ActiveSheet.shapes("rectangle 1").select if Selection.shaperange.fill....etc. then end if Now I want to assign this macro to run on any other shapes in my sheet. But it only execute for shapes("rectangle 1"). Any suggestion? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I create a macro that increments +1 by pressing a button | Excel Discussion (Misc queries) | |||
executing a macro within another | Excel Discussion (Misc queries) | |||
Macro that shows a cell address when pressing the down or up key | Excel Discussion (Misc queries) | |||
Pressing a button using a macro | Excel Programming | |||
What macro is executing? | Excel Programming |