How can I use Shapes in 2007?

N

nkat

In my 2003 excel macro sheet I used:
ActiveSheet.Shapes("Rectangle 23").Select
Selection.ShapeRange.ZOrder msoBringToFront
ActiveSheet.Shapes("Rectangle 24").Select
Selection.ShapeRange.ZOrder msoBringToFront
In 2007 these actions doesn't work. even as I record the action I don't see
them in 2007.
I like to hide some text to put a rectangle in front.
 
B

Barb Reinhardt

IIRC, the shapes code has changed a lot in 2007. I don't have it available,
so can't test right now. Maybe someone else can assist.

I would tweak it for 2003 though. This should get the job done in 2003.

ActiveSheet.Shapes("Rectangle 23").ShapeRange.ZOrder msoBringToFront
ActiveSheet.Shapes("Rectangle 24").ShapeRange.ZOrder msoBringToFront
 
B

Bob Phillips

It's actually more logical IMO in 2007

With ActiveSheet

.Shapes("Rectangle 23").ZOrder msoBringToFront
.Shapes("Rectangle 24").ZOrder msoBringToFront
End With
 
N

nkat

When I use :

''Sheets("SCORECARD").Select
With ActiveSheet

.Shapes("Rectangle 23").ZOrder msoBringToFront
.Shapes("Rectangle 24").ZOrder msoBringToFront
End With

Nothing is changing.
 

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