Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings and reverence to all gurus ! (with a special notice for Stephen
Bullen ;-)) Nothing more simple than copy a range ? This code works normally in VBA: Sheets(1).Select ActiveSheet.Range(Cells(l1, 1), Cells(l2, 2)).Select Selection.Copy Sheets(2).Select Cells(2, 1).Select Sheets(2).Paste In fact, this code is generated by the macro recorder. The following is the translation in my VB dll : Set mySheet = XLS.Sheets(1) 'XLS represents my Workbook mySheet.Activate 'this line is correctly implemented With mySheet .Range(Cells(l1, 1), Cells(l2, 2)).copy This last line fails. It is Range that fails : set r = .Range(Cells(l1, 1), Cells(l2, 2)) also fails (method '~' failed) Anyone know why ? And how to get around this ? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Transferring files from a MAC | Excel Discussion (Misc queries) | |||
transferring data | New Users to Excel | |||
transferring data | Excel Discussion (Misc queries) | |||
Transferring data | Excel Discussion (Misc queries) | |||
transferring cells.. | Excel Discussion (Misc queries) |