Hi
You could do it without opening the source workbook.
here is some code from Ron de Bruin's website
http://www.rondebruin.nl/copy7.htm
which I have modified to suit your case.
Sub Load()
Application.ScreenUpdating = False
On Error Resume Next
'Call the macro GetRange
GetRange "H:\My Documents\TESTS", "CALL LIST.xls", "Sheet1", "A2:A20", _
ActiveCell
On Error GoTo 0
Application.ScreenUpdating = True
End Sub
Sub GetRange(FilePath As String, FileName As String, SheetName As String, _
SourceRange As String, DestRange As Range)
Dim Start
'Go to the destination range
Application.Goto DestRange
'Resize the DestRange to the same size as the SourceRange
Set DestRange = DestRange.Resize(Range(SourceRange).Rows.Count, _
Range(SourceRange).Columns.Count)
'Add formula links to the closed file
With DestRange
.FormulaArray = "='" & FilePath & "/[" & FileName & "]" & SheetName
_
& "'!" & SourceRange
'Wait
Start = Timer
Do While Timer < Start + 2
DoEvents
Loop
'Make values from the formulas
.Copy
.PasteSpecial xlPasteValues
.Cells(1).Select
Application.CutCopyMode = False
End With
End Sub
--
Regards
Roger Govier
"Coder1215" <(E-Mail Removed)> wrote in message
news:980e50c3-49e2-4ba5-a593-(E-Mail Removed)...
> Hi,
>
> I'm using XL2007 on Vista. I want to put in Personal.xlsb a code which
> will copy range of data from another workbook and paste it to
> activecell in any open workbook. I wrote some code but there seems to
> be an error when trying to paste values("Pastespecial methow of range
> class failed").
>
> Sub Load()
>
> Dim wbA As Workbook
> Dim cellA As Range
>
>
> Set wbA = Workbooks.Open(Filename:="H:\My Documents\TESTS\CALL
> LIST.xls")
> Windows("CALL LIST.xls").Activate
> Workbooks("CALL LIST.xls").Worksheets(1).Range("A2:A20").Copy
> Windows("CALL LIST.xls").Close (False)
> Application.ActiveWindow.ActiveCell.Select
> ActiveCell.PasteSpecial (xlPasteValues)
>
> End Sub
>
> Can someone advise on the solution?
>
> thanks and regards