XL97: "Cannot Shift Objects Off Sheet" Error Hiding Columns (Q170081)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q170081
--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html
I came across this problem recently. I had a button from the Forms toolbar
in cell J1.
The code below works if the properties attached to that button are "Move and
Size with cells" but fails if the property is either "Don't move or size
with cells" or "Move but don't size with cells".
Sub HideCols()
Columns("J:IV").EntireColumn.Hidden = True
End Sub
So, if you have a button on your worksheet, right click on the button,
select "Format Control", select "Properties" and then select "Move and Size
with cells"
The above is very similar to the solution Debra's reference relates to, but
that article refers to "Comments". It appears to also apply to "buttons" and
possibly other objects but I have not tested these.
--
Regards
William
willw...@yahoo.com
"Kent" <kent....@swri.org> wrote in message
news:uhtv362...@corp.supernews.com...