LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default cant add a column in vb code


I have opened a spreadsheet and am trying to add a column

if I use the following

selection.Insert Shift:=xlToRight

this works on the first iteration but fails on the second with the
following error
object variable or with block not set.

If i try the following

xlWks.Columns.Insert Shift:=xlToRight i get the message
cannot shift non blank cells off worksheet.

However the worksheet is off limited size (36 rows and 20 columns) and
is
borfered by blank cells none of which have associated formula


--
helenmacduff
------------------------------------------------------------------------
helenmacduff's Profile: http://www.excelforum.com/member.php...o&userid=29020
View this thread: http://www.excelforum.com/showthread...hreadid=487525

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofill column from data (code) in column next to it Matt Excel Worksheet Functions 4 April 24th 09 06:17 PM
what is the code to delete row&column. areddy[_23_] Excel Programming 1 November 9th 05 12:41 PM
VB code to sum up all the figures in a column tanks1308[_2_] Excel Programming 1 August 5th 04 11:46 PM
Reference a Column in Code Wally Steadman[_3_] Excel Programming 1 November 17th 03 11:26 AM
Column Code DaveB[_2_] Excel Programming 3 October 23rd 03 05:21 PM


All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"