Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Selecting a Column

Why don't you do a direct copy (rather than Copy/Paste Special)... it will
copy the values and the formatting. For example,

Detail_Report.Columns(Column).Copy Range("C1")

Note that you do not specify the entire column in the destination, only the
first cell of the range being copied to. You can also do this for smaller
ranges as well. For example...

Range("A1:E5").Copy Range("M7")

--
Rick (MVP - Excel)


"William Wolfe" wrote in message
...
I am running a VBA application and after I have copied data to a worksheet,
I want to copy the column formatting from column N to column N+1. The
following code, first line gives me a 'Select method of Range class
failed'. 'Column' is an Integer number.

' Detail_Report.Columns(Column).Select
' Application.CutCopyMode = False
' Selection.Copy
' Detail_Report.Columns(Column + 1).Select
' Selection.PasteSpecial Paste:=xlPasteFormats

What am I doing wrong?

Thanks,


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
How to get the last row in a column without selecting Michiel via OfficeKB.com Excel Programming 2 February 6th 08 03:06 PM
Text to column and selecting values based on a different column torooo Excel Worksheet Functions 5 October 21st 06 03:35 PM
Text to column and selecting values based on a different column [email protected] Excel Worksheet Functions 1 October 21st 06 03:10 AM
Text to column and selecting values based on a different column torooo Excel Discussion (Misc queries) 1 October 18th 06 07:27 PM
selecting a column in XL Elaine Excel Programming 1 November 23rd 05 09:18 PM


All times are GMT +1. The time now is 02:26 AM.

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"