LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default help with copying column between 2 workbooks through vba

This might need a little tweak but should put on the right path:
< your code
ActiveCell.EntireColumn.Select
Selection.Insert Shift:=xlToRight
*'need code to paste sh1.range("c1:c120") into inserted column here*

'=========== my code

COL = ActiveCell.Column
Cells(1, COL).Select
Filename = "File Name to open??"
ThisSheet = ActiveWorkbook.ActiveSheet.Name
Set BaseBook = Application.ActiveWorkbook.Name
Set SourceBook = Workbooks.Open(Filename)
SourceTab = SourceBook.Worksheets("Sheet1").Index
Set SourceRange =
SourceBook.Worksheets("Sheets1").Range("C1:C120")
SourceRcount = SourceRange.Rows.Count
Set DestRange = BaseBook.Worksheets(ThisSheet).Cells(1, COL)

SourceRange.Copy DestRange
SourceBook.Close False

Hope this helps

Glen



 
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
Copying workbooks Nadji New Users to Excel 4 October 5th 06 03:16 PM
copying workbooks Nadji Excel Worksheet Functions 3 October 4th 06 08:43 PM
Copying from other Workbooks SusieQ Excel Discussion (Misc queries) 0 January 30th 06 12:44 PM
need help for copying among workbooks snow Excel Programming 1 March 26th 05 12:26 PM
Copying from several workbooks into one Anthony Gobel Excel Programming 0 April 6th 04 09:56 PM


All times are GMT +1. The time now is 06:10 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"