#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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

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
AutoShape skid812pb Excel Discussion (Misc queries) 6 June 3rd 09 12:44 PM
autoshape tony Excel Discussion (Misc queries) 1 February 24th 07 09:35 PM
Autoshape jackietreehorn Excel Discussion (Misc queries) 2 November 6th 05 07:56 AM
NAME OF AUTOSHAPE Ronbo Excel Discussion (Misc queries) 3 August 18th 05 10:09 PM
AutoShape Positioning? Ken Excel Discussion (Misc queries) 2 February 8th 05 11:45 PM


All times are GMT +1. The time now is 10:04 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"