Shape PrintObject Help

CaliKidd

Board Regular
Joined
Feb 16, 2011
Messages
173
In lieu of using a forms command button object on a chart, I've decided to use a bevel shape (mainly for cosmetic reasons). I've assigned a macro to it and it's working fine, but I do not want it to be a printable object.

I've tried the following, but it isn't working (i.e., it still prints). The first line is selecting the shape, but the second line doesn't appear to be working. I'm not getting an error message. What am I doing wrong?
Code:
Private Sub Chart_Activate()
    ActiveSheet.Shapes("Bevel 1").Select
    Selection.PrintObject = False
End Sub
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
IN 2007.
Right click on the object, Select Size and Properties / Properties
Then uncheck Print Object.

This is a once only action so code isn't needed
 
Upvote 0
Thanks, Michael. I am using Excel 2007 too. I should have mentioned that up front.

I did try to solve this in the way you described before I posted this topic, but when I right-clicked Size and Properties, Properties, there was no "Print Object" option, only a "Size With Chart" and a "Don't Size With Chart" option. I found that odd, so I proceeded by looking for a programmatic solution.
 
Upvote 0
Seems odd, it's clearly there in 2007

Are you using 2007 Beta or a variant of the proper version of 2007 ?
The 2007 Beta didn't allow the user to set this option.
 
Upvote 0
Michael, as far as I am aware, this is the proper version of Excel. Office 2007 came preinstalled on this machine and I have no reason to believe it is a beta or variant because I get Office updates fine and have SP2 installed. If the problem is with this version of Excel itself, then I'll have to take the matter up with the IT dept on Monday.

Any ways, just to be sure we're on the same wavelength, here is what I did:

From the menu, I clicked Insert, Shapes and then selected the Bevel shape in the Basic Shapes group. It is the first shape on the third row of shapes.

When I click Print Preview, the object is still visible and it also comes out on the printed sheet.

I've also tried this (below), but it still didn't work either:

Code:
    ActiveSheet.Shapes("Bevel 1").ControlFormat.PrintObject = False
 
Upvote 0
Michael, FYI - I just found this article on the net. Apparently others have run into the same problem, so I can only assume at this point that it is a bug in Excel?

Not worth losing a lot of time over. If necessary, I'll just go back to the Forms command button, which I can de-select as a printable object. The command button not as aesthetically pleasing as I'd like, but at least it won't show up on the printout.

http://answers.microsoft.com/en-us/...cel-2007/b9a33a7e-0671-e011-8dfc-68b599b31bf5
 
Upvote 0
Hmm, unlikely a bug.....
I jusr ran this code in 07 and it worked fine !!

Code:
Sub shapetest()
Dim shapes As Object
With ActiveSheet.shapes("Bevel 1")
    .ControlFormat.PrintObject = False
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,854
Members
452,948
Latest member
UsmanAli786

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
Back
Top