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
|