LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Figuring out what the Shape Indexes are.

All,

I am trying to create macros for some ellipse objects on my sheet so that
when a user clicks on it it will turn either white or red depending on what
color it is already. I can't figure out how to determine what the index is
for the object so I can reference it in the Fill command.

Here is the code I have so far for one of the ellipses.

Sub Oval78_Click()
If Worksheets(1).Shapes(1).Fill.ForeColor.RGB = RGB(255, 255, 255) Then
Worksheets(1).Shapes(1).Fill.Background.RGB = RGB(255, 0, 0)
Else
Worksheets(1).Shapes(1).Fill.ForeColor.RGB = RGB(255, 0, 255)
End If
End Sub

Now I assumed that the index number was 78 as in the objects name"Oval78",
but that doesn't seem to change the color. I dont get any errors nor do I
see anything actually change colors.

I am using index number 1 because thats the only thing that doesnt give me a
error.

Can any one provide me with some tips?

TIA

Jeff Reed


 
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
figuring tax jesseok New Users to Excel 2 October 22nd 08 02:11 PM
Vlookup using concatenated column indexes Matt Excel Worksheet Functions 7 June 9th 08 02:07 AM
Figuring Age Sue Excel Worksheet Functions 2 March 18th 08 05:51 PM
my curser changed from arrow shape to a cross shape???? bj New Users to Excel 1 February 5th 07 02:47 PM
Figuring hours scott45 Excel Worksheet Functions 6 August 29th 05 09:54 PM


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