Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to: Open closed workbook/Search data tables/Return data to open workbook | Excel Discussion (Misc queries) | |||
Copy Data from Multiple Closed Workbooks to Open Workbook | Excel Programming | |||
1.Open workbook. 2 copy data. 3 replace data. 4 save workbook. | Excel Programming | |||
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook | Excel Programming | |||
Open a password protected excel workbook from second workbook to fetch data using dynamic connection | Excel Programming |