View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Can't delete columns in Excel VBA

Hi Bill,

See MSKB Article # 211769:
"Cannot shift objects off sheet" error message when
you hide columns in Excel "

http://support.microsoft.com/default...b;en-us;211769


---
Regards,
Norman



"BillReese" wrote in message
news:5Vvag.3889$343.2375@trnddc06...
I am automating Excel from a VB application.

I attempted to insert a column way down in my code (after populating the
sheet with many columns from data from many files (maybe 32, maybe 48, or
64 columns of ASCII Data).

My code bombed when I attempted the insert of a new column saying it
can't shift cells off the edge of the worksheet. After I failed at that:
I attempted to delete all empty columns to the right of my used area, and
my code also bombs, don't remember that error message right now.

can someone tell me what I need to do in order to either insert new
columns, so that any data will shift off the edge of the sheet, or how I
can get my empty columns deleted. ( I don't need code to find last used
column, I already have that)

Thanks BillReese