Send to back in VBA

melewie

Board Regular
Joined
Nov 21, 2008
Messages
185
Hello all,

I have a shape on a worksheet (called Block_Help) I would like to send this to the back or front deppending on a few diffrent things.

Does any one have any ideas? A recorded macro is blank!

any help would be great.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Here's what the macro recorder gave me (Excel 2000):

Code:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 26/04/2010 by apoulsom
'
'
    ActiveSheet.Shapes("Block_Help").Select
    Selection.ShapeRange.ZOrder msoSendToBack
End Sub
 

melewie

Board Regular
Joined
Nov 21, 2008
Messages
185
Here's what the macro recorder gave me (Excel 2000):

Code:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 26/04/2010 by apoulsom
'
'
    ActiveSheet.Shapes("Block_Help").Select
    Selection.ShapeRange.ZOrder msoSendToBack
End Sub

Thanks that works perfectly

when I recored a macro it was blank!! im using excel 2007 does this make a diffrence?
 

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707

ADVERTISEMENT

It could well have made a difference as the macro recorder certainly doesn't work with charts in xl2007.
 

melewie

Board Regular
Joined
Nov 21, 2008
Messages
185

ADVERTISEMENT

It could well have made a difference as the macro recorder certainly doesn't work with charts in xl2007.

that could be a pain I use my recorder quite alot to help me with VBA :(

does any one know what else xl2007 cant record on?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
38,088
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
See this less than helpful MSKB article.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,983
Messages
5,767,438
Members
425,413
Latest member
ccfam04

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top