Excel cannot shift nonblank cells off the worksheet


Posted by Patrick Gray on April 22, 2001 8:55 AM

I get an error mssg stating to prevent possible loss of data ... the mssg goes on to suggest I try to delete or clear the cells to the right and below data, then select cell A1 and save workbook to reset the last cell used. Or you can move the data to a new location and try again.

I can not delete the data to the right of the column, since I am selecting the entire column data below should not apply. Selecting cell A1 and saving doesn't help either.

The code in my VBA macro that is causing this mssg is below:

Columns("A:A").Select
Selection.Insert Shift:=xlToRight

And worst of all the problem is intermittent and have not been able to isolate the root cause.

Anyone else encounter this message, and know a work around?



Posted by Patrick Gray on April 22, 2001 10:39 AM

Nevermind

Some how my macro put data into row IV (the last column of a sheet). This was not intended.