Excel Spreadsheets "Cannot shift objects off sheet&quot

Asghar36

New Member
Joined
Feb 12, 2004
Messages
2
Hi,

Was wondering if someone out there could help me with a problem I am encoutering on an excel workbook. As I try to hide certian columns on some of the worksheets, Excel does not allow it with the error message "Cannot shift objects off sheet".

Has any one encountered this problem? What can be causing it and how do I fix it?

Thanks in advance.

Asghar
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Re: Excel Spreadsheets "Cannot shift objects off sheet&quot

Code:
Sub Test()
Dim s As Shape 
On Error Resume Next
For Each s In ActiveSheet.Shapes 
s.Placement = xlMoveAndSize
Next 
End Sub</pre>

from the link above
this trick still usefully after 5years :D


thanks!
 
Upvote 0
Re: Excel Spreadsheets "Cannot shift objects off sheet&quot

Code:
Sub Test()
Dim s As Shape 
On Error Resume Next
For Each s In ActiveSheet.Shapes 
s.Placement = xlMoveAndSize
Next 
End Sub</pre>

from the link above
this trick still usefully after 5years :D


thanks!
Can someone please explain to me in plain English what this code does before I apply it? I don't want to mess up the rest of my worksheet but I would like to regain the ability to hide or show columns.

Thanks!
-Peter
 
Upvote 0

Forum statistics

Threads
1,214,400
Messages
6,119,289
Members
448,885
Latest member
LokiSonic

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