PC Review


Reply
Thread Tools Rate Thread

ActiveSheet.Shapes("Rectangle 23").Select will not work in 2007

 
 
nkat
Guest
Posts: n/a
 
      12th Nov 2008
In Excel 2003 you have the possibility to bring a txt box to front and a text
box to the back:

ActiveSheet.Shapes("Rectangle 23").Select
Selection.ShapeRange.ZOrder msoSendToBack
ActiveSheet.Shapes("Rectangle 24").Select
Selection.ShapeRange.ZOrder msoBringToFront
ActiveSheet.Shapes("Rectangle 29").Select
Selection.ShapeRange.ZOrder msoBringToFront
Range("E12").Select
In 2007 version. The rectangles are not recognized in Macro recording but in
the sheet it is also not possible to bring them backwards. It seems to be
that you work in different layers.

In my sheet you can make 1 choice. At that moment the other 2 possibilities
are partly hidden via a withe rectangle.

This works perfect in 95-2003 version but not in 2007. How can I solve this
problem?
 
Reply With Quote
 
 
 
 
Bernard Liengme
Guest
Posts: n/a
 
      12th Nov 2008
The macros work in XL2007 even if they do not record
So either copy&paste or type them in
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"nkat" <(E-Mail Removed)> wrote in message
news:F79E0A6E-3FF4-4F9C-9C5B-(E-Mail Removed)...
> In Excel 2003 you have the possibility to bring a txt box to front and a
> text
> box to the back:
>
> ActiveSheet.Shapes("Rectangle 23").Select
> Selection.ShapeRange.ZOrder msoSendToBack
> ActiveSheet.Shapes("Rectangle 24").Select
> Selection.ShapeRange.ZOrder msoBringToFront
> ActiveSheet.Shapes("Rectangle 29").Select
> Selection.ShapeRange.ZOrder msoBringToFront
> Range("E12").Select
> In 2007 version. The rectangles are not recognized in Macro recording but
> in
> the sheet it is also not possible to bring them backwards. It seems to be
> that you work in different layers.
>
> In my sheet you can make 1 choice. At that moment the other 2
> possibilities
> are partly hidden via a withe rectangle.
>
> This works perfect in 95-2003 version but not in 2007. How can I solve
> this
> problem?



 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      12th Nov 2008
I copy/pasted your code into XL2007 and it works fine. I can also send the
Rectangles forward and backward in the stack of rectangles on the worksheet
manually as well (using "Bring to Front" and "Sent to Back" from the "Page
Layout" panel). You are right about the Macro Recorder though... it does not
seem to see the change in ordering of the rectangles.

--
Rick (MVP - Excel)


"nkat" <(E-Mail Removed)> wrote in message
news:F79E0A6E-3FF4-4F9C-9C5B-(E-Mail Removed)...
> In Excel 2003 you have the possibility to bring a txt box to front and a
> text
> box to the back:
>
> ActiveSheet.Shapes("Rectangle 23").Select
> Selection.ShapeRange.ZOrder msoSendToBack
> ActiveSheet.Shapes("Rectangle 24").Select
> Selection.ShapeRange.ZOrder msoBringToFront
> ActiveSheet.Shapes("Rectangle 29").Select
> Selection.ShapeRange.ZOrder msoBringToFront
> Range("E12").Select
> In 2007 version. The rectangles are not recognized in Macro recording but
> in
> the sheet it is also not possible to bring them backwards. It seems to be
> that you work in different layers.
>
> In my sheet you can make 1 choice. At that moment the other 2
> possibilities
> are partly hidden via a withe rectangle.
>
> This works perfect in 95-2003 version but not in 2007. How can I solve
> this
> problem?


 
Reply With Quote
 
nkat
Guest
Posts: n/a
 
      12th Nov 2008
Hi Rick,

thanks but can you try it in relation with a drop down menu?
Do I have to change some settings?

Kind regards

"Rick Rothstein" wrote:

> I copy/pasted your code into XL2007 and it works fine. I can also send the
> Rectangles forward and backward in the stack of rectangles on the worksheet
> manually as well (using "Bring to Front" and "Sent to Back" from the "Page
> Layout" panel). You are right about the Macro Recorder though... it does not
> seem to see the change in ordering of the rectangles.
>
> --
> Rick (MVP - Excel)
>
>
> "nkat" <(E-Mail Removed)> wrote in message
> news:F79E0A6E-3FF4-4F9C-9C5B-(E-Mail Removed)...
> > In Excel 2003 you have the possibility to bring a txt box to front and a
> > text
> > box to the back:
> >
> > ActiveSheet.Shapes("Rectangle 23").Select
> > Selection.ShapeRange.ZOrder msoSendToBack
> > ActiveSheet.Shapes("Rectangle 24").Select
> > Selection.ShapeRange.ZOrder msoBringToFront
> > ActiveSheet.Shapes("Rectangle 29").Select
> > Selection.ShapeRange.ZOrder msoBringToFront
> > Range("E12").Select
> > In 2007 version. The rectangles are not recognized in Macro recording but
> > in
> > the sheet it is also not possible to bring them backwards. It seems to be
> > that you work in different layers.
> >
> > In my sheet you can make 1 choice. At that moment the other 2
> > possibilities
> > are partly hidden via a withe rectangle.
> >
> > This works perfect in 95-2003 version but not in 2007. How can I solve
> > this
> > problem?

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
grouping "shapes" to pictures in word 2007 rockhammer Microsoft Word Document Management 1 9th Mar 2010 04:52 PM
What are the reasons for ""ActiveSheet.Paste Link:=True"" failure CAPTGNVR Microsoft Excel Programming 9 7th Jul 2007 09:56 PM
how to show the position of shapes like "rectangle" =?Utf-8?B?U3VtZXRo?= Microsoft Excel New Users 0 7th Jul 2007 05:48 AM
activesheet.shapes("Group 1...n") Andreww Microsoft Excel Programming 1 18th May 2007 11:14 AM
How to remove small rectangle in text file(notpad) & "\n" not work =?Utf-8?B?U2FuZHk=?= Microsoft VC .NET 1 7th Feb 2005 07:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:58 PM.