![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 217
|
Hi,
I was just wondering if all the code below is correct.I was trying to add the find option to it and it leaves funny black cells behind. Never seen this before happening. It seems to copy correctly though. Thanks a million Anndonny Dim rng As Range Dim rng_find As Range Set rng_find = Workbooks("Test1.xls").Worksheets("Sheet1").Range("A1:A65000").Find(what:="RedLine") With Workbooks("Test2.xls").Worksheets("Sheet1") ' periods in front of all references except rng Set rng = .Range(.Range("A2"), .Range("G2").End(xlDown)) End With rng.Copy Destination:=rng_find.Offset(1, 0) |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 41
|
Andonny
I don't know what you mean by leaves funny black cells behind, but the code seems to work. If, somewhere in your original code, you are selecting before copying or pasting, the black cells could just be the selected cells. If that is not the case, you may like to post the full code. Any help? Regards Robb__ |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|