hiding most of the rows in a sheet

cheveley

Active Member
Joined
Sep 24, 2002
Messages
273
I am trying to hide most of the rows in a sheet but when I attempt to do so I get the following errror message "cannot shift object off sheet".

Can anyone give me a pointer to correct this.

Thanks.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi, cheveley,

don't know about details but you have some shapes on your sheet which "need" enough visible rows to be displayed

what you can do is expand the last visible row (or more rows) to the maximum height and color them like your excelbackground

kind regards,
Erik
 
Upvote 0
oh yes, how does one find a drawing object on a worksheet if you dont know where it is?

thanks again.
 
Upvote 0
Code:
Sub test()
For Each sh In ActiveSheet.Shapes
'sh.Select
sh.TopLeftCell.Select
Next sh
End Sub

step through code with function key F8 or use a "stop" line or a breakpoint
or Application.Wait Now + 2 / 60 / 60 / 24 (wait 2 seconds)
 
Upvote 0
hi erik

thought i had solved the problem by deleting a named cell but that does not seem to have done the trick (worked first time). funny thing is the worksheet does not have any charts and I dont think there are any drawing objects (unless by accident).

still playing, will post when have solution............
 
Upvote 0
updated the code to be sure you would understand
Code:
Sub test()
For Each sh In ActiveSheet.Shapes
sh.TopLeftCell.Select
Application.Wait Now + 2 / 60 / 60 / 24
Next sh
End Sub
this will show you where they are
 
Upvote 0
thanks for the code but I would not even be sure where to stick it, in module 1 in VB?
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

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