Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have following VBA code:
Dim wsSource As Worksheet, wsTarget As Worksheet Dim rFrom As Range, rTo As Range Dim eRow As Long Set wsSource = Sheets("GRADE") Set wsTarget = Sheets(wsDestination) wsTarget.Range("G12:Z200").ClearFormats eRow = wsSource.Cells(Rows.Count, 2).End(xlUp).Row Set rFrom = wsSource.Range("B12:F" & eRow) Set rTo = wsTarget.Range("B12") rFrom.Copy Destination:=rTo The code works, but I got following fail message sometimes. Run-time error '-2147417848 (80010108)' Method 'Copy' of objecgt 'Range' failed The excel crashed if I got this fail. It seems that my range does not have data to copy from, but I check my spreadsheet. There are data on it. What I should check for above case? What may go wrong? Any information is great appreciated, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Crashed - All Hyperlinks broken | Excel Discussion (Misc queries) | |||
How do I re-download Excel onto my computer (it crashed)? | Excel Discussion (Misc queries) | |||
Excel Crashed Terribly | Excel Discussion (Misc queries) | |||
Excel Copy Method Failing. | Excel Programming | |||
Excel workbook crashed | Excel Worksheet Functions |