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

I have a lot of triangle autoshapes in row 20, that are used as macro
buttons. I want the current button that is being used to change to a
differant color. I have each autoshape programmed to change color when
selected.

What I need is a way for the autoshape to return to its original color when
another autoshape is selected.

Something to the effect;

ActiveSheet.Shapes("Row 20").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid

As always, any help/suggestions is very much appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find Autoshape

Either maintain a variable that has a reference to the shape. then use that
in your macro to restore the color

or
At the start of your macro
Loop through all the appropriate shapes and recolor them.

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
I have a lot of triangle autoshapes in row 20, that are used as macro
buttons. I want the current button that is being used to change to a
differant color. I have each autoshape programmed to change color when
selected.

What I need is a way for the autoshape to return to its original color

when
another autoshape is selected.

Something to the effect;

ActiveSheet.Shapes("Row 20").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid

As always, any help/suggestions is very much appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Find Autoshape

Tom -

The first option is what I am looking for becasue there are a lot of
autoshapes. A variable that would reference the shape would be great, but
how do I generate that reference.

Also, how do you identify the autoshape Id or Number?


Thanks a lot for your help.


"Tom Ogilvy" wrote:

Either maintain a variable that has a reference to the shape. then use that
in your macro to restore the color

or
At the start of your macro
Loop through all the appropriate shapes and recolor them.

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
I have a lot of triangle autoshapes in row 20, that are used as macro
buttons. I want the current button that is being used to change to a
differant color. I have each autoshape programmed to change color when
selected.

What I need is a way for the autoshape to return to its original color

when
another autoshape is selected.

Something to the effect;

ActiveSheet.Shapes("Row 20").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid

As always, any help/suggestions is very much appreciated.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find Autoshape

Show your code that colors the Autoshape.

Is it assigned to the autoshape? Do you have a routine for each shape?

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
Tom -

The first option is what I am looking for becasue there are a lot of
autoshapes. A variable that would reference the shape would be great, but
how do I generate that reference.

Also, how do you identify the autoshape Id or Number?


Thanks a lot for your help.


"Tom Ogilvy" wrote:

Either maintain a variable that has a reference to the shape. then use

that
in your macro to restore the color

or
At the start of your macro
Loop through all the appropriate shapes and recolor them.

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
I have a lot of triangle autoshapes in row 20, that are used as macro
buttons. I want the current button that is being used to change to a
differant color. I have each autoshape programmed to change color

when
selected.

What I need is a way for the autoshape to return to its original color

when
another autoshape is selected.

Something to the effect;

ActiveSheet.Shapes("Row 20").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid

As always, any help/suggestions is very much appreciated.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Find Autoshape

Tom:

The code I have for (AutoShape 1) is;

Sub SCA()
'
' SCA Macro "Sort Column C Accending"
'
Application.DisplayFullScreen = False
ActiveSheet.Protect UserInterFaceOnly:=True
Range("A19:CX219").Select
Selection.Sort Key1:=Range("C19"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A19").Select

ActiveSheet.Shapes("AutoShape 1").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("c18").Select
Application.DisplayFullScreen = True

End Sub

Yes it is assigned to the AutoShape, as are all.

All Autohapes reside in row 18, two to a cell, so that C18 contains two
triangle AutoShapes; one a triangle the other an upsidedown triangle
(Accending/Decending) each has a macro to do a (Accending/Decending) sort on
the column.

My routine will do the sort and color the sort button "Yellow", so that it
is easy to identify the sort criteria. But when I choose a new sort, the
next AutoShape will change to "Yellow" but now I have two "Yellow" sort
identifiers.

I need to change all Autoshapes back to gray then run my routine.

As Always, Thanks A Lot









"Tom Ogilvy" wrote:

Show your code that colors the Autoshape.

Is it assigned to the autoshape? Do you have a routine for each shape?

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
Tom -

The first option is what I am looking for becasue there are a lot of
autoshapes. A variable that would reference the shape would be great, but
how do I generate that reference.

Also, how do you identify the autoshape Id or Number?


Thanks a lot for your help.


"Tom Ogilvy" wrote:

Either maintain a variable that has a reference to the shape. then use

that
in your macro to restore the color

or
At the start of your macro
Loop through all the appropriate shapes and recolor them.

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
I have a lot of triangle autoshapes in row 20, that are used as macro
buttons. I want the current button that is being used to change to a
differant color. I have each autoshape programmed to change color

when
selected.

What I need is a way for the autoshape to return to its original color
when
another autoshape is selected.

Something to the effect;

ActiveSheet.Shapes("Row 20").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid

As always, any help/suggestions is very much appreciated.









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find Autoshape

' at the top of the module outside any procedure.
Public Obj as Object

Sub SCA()
'
' SCA Macro "Sort Column C Accending"
'
Application.DisplayFullScreen = False
ActiveSheet.Protect UserInterFaceOnly:=True
Range("A19:CX219").Select
Selection.Sort Key1:=Range("C19"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A19").Select


If not obj is Nothing then
obj.ShapeRange.Fill.ForeColor.SchemeColor = "whatever
end if
ActiveSheet.Shapes("AutoShape 1").Select
set Obj = Selection
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("c18").Select
Application.DisplayFullScreen = True

End Sub





--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
Tom:

The code I have for (AutoShape 1) is;

Sub SCA()
'
' SCA Macro "Sort Column C Accending"
'
Application.DisplayFullScreen = False
ActiveSheet.Protect UserInterFaceOnly:=True
Range("A19:CX219").Select
Selection.Sort Key1:=Range("C19"), Order1:=xlAscending,

Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A19").Select

ActiveSheet.Shapes("AutoShape 1").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("c18").Select
Application.DisplayFullScreen = True

End Sub

Yes it is assigned to the AutoShape, as are all.

All Autohapes reside in row 18, two to a cell, so that C18 contains two
triangle AutoShapes; one a triangle the other an upsidedown triangle
(Accending/Decending) each has a macro to do a (Accending/Decending) sort

on
the column.

My routine will do the sort and color the sort button "Yellow", so that it
is easy to identify the sort criteria. But when I choose a new sort, the
next AutoShape will change to "Yellow" but now I have two "Yellow" sort
identifiers.

I need to change all Autoshapes back to gray then run my routine.

As Always, Thanks A Lot









"Tom Ogilvy" wrote:

Show your code that colors the Autoshape.

Is it assigned to the autoshape? Do you have a routine for each shape?

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
Tom -

The first option is what I am looking for becasue there are a lot of
autoshapes. A variable that would reference the shape would be great,

but
how do I generate that reference.

Also, how do you identify the autoshape Id or Number?


Thanks a lot for your help.


"Tom Ogilvy" wrote:

Either maintain a variable that has a reference to the shape. then

use
that
in your macro to restore the color

or
At the start of your macro
Loop through all the appropriate shapes and recolor them.

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
I have a lot of triangle autoshapes in row 20, that are used as

macro
buttons. I want the current button that is being used to change

to a
differant color. I have each autoshape programmed to change color

when
selected.

What I need is a way for the autoshape to return to its original

color
when
another autoshape is selected.

Something to the effect;

ActiveSheet.Shapes("Row 20").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid

As always, any help/suggestions is very much appreciated.









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Find Autoshape

Tom:

PERFECT!!! Exactly what I was looking for.

Thanks a lot for your help.





"Tom Ogilvy" wrote:

' at the top of the module outside any procedure.
Public Obj as Object

Sub SCA()
'
' SCA Macro "Sort Column C Accending"
'
Application.DisplayFullScreen = False
ActiveSheet.Protect UserInterFaceOnly:=True
Range("A19:CX219").Select
Selection.Sort Key1:=Range("C19"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A19").Select


If not obj is Nothing then
obj.ShapeRange.Fill.ForeColor.SchemeColor = "whatever
end if
ActiveSheet.Shapes("AutoShape 1").Select
set Obj = Selection
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("c18").Select
Application.DisplayFullScreen = True

End Sub





--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
Tom:

The code I have for (AutoShape 1) is;

Sub SCA()
'
' SCA Macro "Sort Column C Accending"
'
Application.DisplayFullScreen = False
ActiveSheet.Protect UserInterFaceOnly:=True
Range("A19:CX219").Select
Selection.Sort Key1:=Range("C19"), Order1:=xlAscending,

Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A19").Select

ActiveSheet.Shapes("AutoShape 1").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("c18").Select
Application.DisplayFullScreen = True

End Sub

Yes it is assigned to the AutoShape, as are all.

All Autohapes reside in row 18, two to a cell, so that C18 contains two
triangle AutoShapes; one a triangle the other an upsidedown triangle
(Accending/Decending) each has a macro to do a (Accending/Decending) sort

on
the column.

My routine will do the sort and color the sort button "Yellow", so that it
is easy to identify the sort criteria. But when I choose a new sort, the
next AutoShape will change to "Yellow" but now I have two "Yellow" sort
identifiers.

I need to change all Autoshapes back to gray then run my routine.

As Always, Thanks A Lot









"Tom Ogilvy" wrote:

Show your code that colors the Autoshape.

Is it assigned to the autoshape? Do you have a routine for each shape?

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
Tom -

The first option is what I am looking for becasue there are a lot of
autoshapes. A variable that would reference the shape would be great,

but
how do I generate that reference.

Also, how do you identify the autoshape Id or Number?


Thanks a lot for your help.


"Tom Ogilvy" wrote:

Either maintain a variable that has a reference to the shape. then

use
that
in your macro to restore the color

or
At the start of your macro
Loop through all the appropriate shapes and recolor them.

--
Regards,
Tom Ogilvy

"Ronbo" wrote in message
...
I have a lot of triangle autoshapes in row 20, that are used as

macro
buttons. I want the current button that is being used to change

to a
differant color. I have each autoshape programmed to change color
when
selected.

What I need is a way for the autoshape to return to its original

color
when
another autoshape is selected.

Something to the effect;

ActiveSheet.Shapes("Row 20").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid

As always, any help/suggestions is very much appreciated.










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 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 Glenn Excel Programming 4 May 12th 05 02:43 AM
autoshape scrabtree[_2_] Excel Programming 1 August 13th 04 01:36 PM


All times are GMT +1. The time now is 07:31 AM.

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"