autoshape macro
I use a rectangle auto shape as a button to run a macro that enters a value
in the active cell then moves one cell to the right, then the macro changes the colour of the rectangle so i know when its been clicked. This works really well but is it possible to make it even better by giving the button a duel roll? I want the first click to run the macro as ive just said finishing with the rectangle changing colour, then if clicked again i would like it to change the rectangle back to its original state without entering anything in any active cell. Is this possible? Thanks |
autoshape macro
Just have the macro test the color before taking action:
Sub servient() ActiveSheet.Shapes("AutoShape 1").Select x = Selection.ShapeRange.Fill.ForeColor.SchemeColor If x = 13 Then 'do something Else 'do some othr thing End If End Sub -- Gary''s Student - gsnu200749 "jackrobyn1" wrote: I use a rectangle auto shape as a button to run a macro that enters a value in the active cell then moves one cell to the right, then the macro changes the colour of the rectangle so i know when its been clicked. This works really well but is it possible to make it even better by giving the button a duel roll? I want the first click to run the macro as ive just said finishing with the rectangle changing colour, then if clicked again i would like it to change the rectangle back to its original state without entering anything in any active cell. Is this possible? Thanks |
All times are GMT +1. The time now is 03:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com