Copy data range from one Sheet to Another [Closed]

Report
Posts
1
Registration date
Monday May 11, 2015
Status
Member
Last seen
May 11, 2015
-
Hi,

i try cope one Range for another Sheet in the Work book but I failed in the Past method and i dont find the problem

Sub CopyClearedDefect()
'
Dim StartCleared
Dim EndCleared
Dim CopeDefects, CopyDest As Range

On Error GoTo ErrorHandler

Sheets("TOtal Rally").Select
'Selection.Range ("A1:A1000")

With Worksheets("TOtal Rally").Range("a1:a500")
Set c = .Find("Start Cleared", LookIn:=xlValues)
If Not c Is Nothing Then
StartCleared = c.Row
End If

Set c = .Find("End Cleared", LookIn:=xlValues)
If Not c Is Nothing Then
EndCleared = c.Row
End If

Set CopeDefects = Worksheets("TOtal Rally").Range("A" & StartCleared, "N" & EndCleared)
CopeDefects.Copy

Sheets("DataCleared").Select
Set CopyDest = Selection.Range("A1:N100")
'Range("A1").Select
CopyDest.ClearContents
CopyDest.Clear
Sheets("DataCleared").Range("A1").Select
Selection.Paste
'CopyDest.Paste
' ActiveSheet.Paste

ErrorHandler:
'Sheets("DataCleared").Range("A1:N100").ClearContents
'Application.ScreenUpdating = True
MsgBox "The Sheet " & ActiveSheet.Name & " Error: " & Err.Number & " - " & Err.Description
Exit Sub
End With


End Sub

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!