PC Review


Reply
Thread Tools Rate Thread

Adding Columns in Excel 2007 (2003 Compatibility Mode)

 
 
=?Utf-8?B?QW5keUo=?=
Guest
Posts: n/a
 
      27th Aug 2007
both Please advise,

I am trying to add columns as per the following code:

Columns("B:B").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

When i check the worksheet, columns A and B have been selected,

If I run the following code:

Columns("C:C").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

only Column C is selected.

Can anyone help?
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      28th Aug 2007
I didn't start xl2007, but different versions of excel treat merged cells
differently.

Do you have any cells in A:B that are merged?

AndyJ wrote:
>
> both Please advise,
>
> I am trying to add columns as per the following code:
>
> Columns("B:B").Select
> Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
>
> When i check the worksheet, columns A and B have been selected,
>
> If I run the following code:
>
> Columns("C:C").Select
> Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
>
> only Column C is selected.
>
> Can anyone help?


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?QW5keUo=?=
Guest
Posts: n/a
 
      28th Aug 2007
Cheers Dave,

I didnt consider that!.

I have been writing in VB.NET and not VBA for the last couple of years and
have forgotten some simple checks.

Thanks for your help.


"Dave Peterson" wrote:

> I didn't start xl2007, but different versions of excel treat merged cells
> differently.
>
> Do you have any cells in A:B that are merged?
>
> AndyJ wrote:
> >
> > both Please advise,
> >
> > I am trying to add columns as per the following code:
> >
> > Columns("B:B").Select
> > Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
> >
> > When i check the worksheet, columns A and B have been selected,
> >
> > If I run the following code:
> >
> > Columns("C:C").Select
> > Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
> >
> > only Column C is selected.
> >
> > Can anyone help?

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Compatibility Mode Marsh Microsoft Excel New Users 1 26th Feb 2010 05:48 PM
EXCEL 2007 COMPATIBILITY MODE ISSUE Gemi Microsoft Excel Setup 1 29th Sep 2008 03:01 AM
Compatibility Mode to Excel 2007 Jennifer Microsoft Excel Worksheet Functions 4 16th Sep 2008 05:49 PM
Can't save any more in Excel 2007 Compatibility Mode kreutz Microsoft Excel Programming 0 17th Jan 2008 05:24 PM
2007 Compatibility Mode (graphics not displaying using 2003) =?Utf-8?B?Z29vZnkxMQ==?= Microsoft Powerpoint 0 19th Apr 2007 04:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:31 AM.