C
Coder1215
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
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