Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default VSTO column insert shift to right

Folks,

What's the syntax for inserting a column and shifting cells to the right?

This is close but no cigar:

((Excel.Range)rng.Cells[1,c]).EntireColumn.Insert(Shift.xlRight,Type.Missing);

the Shift.xlRight is incorrect.

--
Bob Sullentrup
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default VSTO column insert shift to right

Yes, here it is:

Excel.XlInsertShiftDirection.xlShiftToRight

Seek and ye shall find.


--
Bob Sullentrup


"Bob Sullentrup" wrote:

Folks,

What's the syntax for inserting a column and shifting cells to the right?

This is close but no cigar:

((Excel.Range)rng.Cells[1,c]).EntireColumn.Insert(Shift.xlRight,Type.Missing);

the Shift.xlRight is incorrect.

--
Bob Sullentrup

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VSTO column insert shift to right

When your inserting an entire column, you don't need to specify the shift
command.


--
Regards,
Tom Ogilvy


"Bob Sullentrup" wrote in message
...
Yes, here it is:

Excel.XlInsertShiftDirection.xlShiftToRight

Seek and ye shall find.


--
Bob Sullentrup


"Bob Sullentrup" wrote:

Folks,

What's the syntax for inserting a column and shifting cells to the

right?

This is close but no cigar:


((Excel.Range)rng.Cells[1,c]).EntireColumn.Insert(Shift.xlRight,Type.Missing
);

the Shift.xlRight is incorrect.

--
Bob Sullentrup



Reply
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
Insert row/column error "Cannot shift object off sheet" Michelle Roach Excel Discussion (Misc queries) 2 May 23rd 08 05:51 PM
can't insert a column, can't shift columns off the sheet. Janis Excel Discussion (Misc queries) 4 July 25th 07 07:26 PM
I want to align two columns by using insert/shift down Britz Excel Worksheet Functions 0 April 30th 07 09:50 PM
Finding the last nonblank cell in a column in VBA or VSTO Bob Sullentrup Excel Programming 1 September 9th 05 05:18 AM
expression.Insert(Shift, CopyOrigin) ? Alex T Excel Programming 1 September 23rd 03 04:00 AM


All times are GMT +1. The time now is 03:05 PM.

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

About Us

"It's about Microsoft Excel"