View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Tim Wallace Tim Wallace is offline
external usenet poster
 
Posts: 5
Default cannot shift objects off sheet

If I Ctrl+End, the active cell is the last cell of what I entered. I
already did the "clear" trick; no luck.

Tim

"George Nicholson" wrote in message
...
When you do Ctrl+End (or EditGo-ToSpecialLastCell) where does the
active cell end up? Row 65,536? That's why it isn't allowing inserts
(Excel has a limit of 65,536 rows and 255 columns)

Excel sometimes considers a lot more of a worksheet to be "in use" than
might be apparent to the naked eye. This can be due to indescriminate
formatting, etc.

In any case, highlight "your" 1st empty row through row 65536, right click
& select "Delete". The Delete key will *not* do what you want, it will
only "clear cell contents" and won't change what Excel considers to be
the "used range". Do the same thing for any "empty" columns that you and
Excel disagree on. Save the file, close & reopen. Do Ctrl+End again until
it is what you expect. (depending on your version the close & reopen may
not be necessary).

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"Tim Wallace" <twallace-ThisDoesNotBelong-AT-emailDOTcom wrote in message
...
I've posted this problem in some C# groups, but after a couple of days,
I've not gotten any useful responses. So, here goes again.

I have a C# application from which I need to open an Excel (2003
11.6255.6360 SP1) sheet, insert some rows and then leave open for the
user. I have no hidden rows or columns. I have no comments. (these
facts are so I don't get pointed to unapplicable Knowledge Base
articles). Whenever I attempt to insert a row, I get a "cannot shift
objects off sheet" error, even though all of the columns are visible and
within the print area and there are 8 blank rows visible and in the print
area. Can anyone lend a hand in figuring this out?

I'm really at wits end on this, as this is the only thing keeping me from
completing my project, and I've been at it for a number of days now.

Tim