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

N

nkat

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?
 
B

Bernard Liengme

The macros work in XL2007 even if they do not record
So either copy&paste or type them in
best wishes
 
R

Rick Rothstein

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.
 
N

nkat

Hi Rick,

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

Kind regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top