Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default AutoShape color

I need to make a traffic light using circles- Only one would be "on" at a
time (this doesn't need to be part of the code though).
You would click it to make it fill with color and click again to turn it off.
Thank you for any help you can give. I have tried a number of coding options
and can't get the color part to work.
--
Thanks,
Nikki
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default AutoShape color


Sub FillShapeColour()
Static fOn As Boolean

With ActiveSheet.Shapes(Application.Caller)

If fOn Then

.Fill.Visible = msoFalse
Else

.Fill.Visible = msoTrue
.Fill.ForeColor.SchemeColor = 10
End If
End With

fOn = Not fOn
End Sub

--
__________________________________
HTH

Bob

"Nikki" wrote in message
...
I need to make a traffic light using circles- Only one would be "on" at a
time (this doesn't need to be part of the code though).
You would click it to make it fill with color and click again to turn it
off.
Thank you for any help you can give. I have tried a number of coding
options
and can't get the color part to work.
--
Thanks,
Nikki



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default AutoShape color

Thanks - that is perfect.
--
Thanks,
Nikki


"Bob Phillips" wrote:


Sub FillShapeColour()
Static fOn As Boolean

With ActiveSheet.Shapes(Application.Caller)

If fOn Then

.Fill.Visible = msoFalse
Else

.Fill.Visible = msoTrue
.Fill.ForeColor.SchemeColor = 10
End If
End With

fOn = Not fOn
End Sub

--
__________________________________
HTH

Bob

"Nikki" wrote in message
...
I need to make a traffic light using circles- Only one would be "on" at a
time (this doesn't need to be part of the code though).
You would click it to make it fill with color and click again to turn it
off.
Thank you for any help you can give. I have tried a number of coding
options
and can't get the color part to work.
--
Thanks,
Nikki




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
Automatically change autoshape color to that of another autoshape T-bone Excel Programming 2 October 24th 08 01:43 AM
autoshape color conditional formating Dennis Collins Excel Discussion (Misc queries) 11 May 16th 08 01:35 PM
Change color of an autoshape Ly Excel Programming 5 September 29th 07 04:46 PM
Change color of Autoshape in chart John Michl Excel Programming 3 May 12th 07 03:14 AM
How do I change the color Excel Autoshape using VBA? jmtricker Excel Programming 2 February 6th 07 05:27 PM


All times are GMT +1. The time now is 01:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"