I don't know what is wrong with this code. it shows an error at Rng.select. When i tested on a separate sheet it worked. Any help?.
Sub copyex()
Dim Lastro As Integer
Dim oSht As Worksheet
Dim Rng As Range
'make exact copy at S6 for comparasion
Set oSht = Workbooks("Main.xlsm").Sheets("Work")
Lastro = oSht.Cells(Rows.Count, 2).End(xlUp).Row
With oSht
Set Rng = oSht.Range("B6:G" & Lastro)
Rng.Select
Selection.Copy
Range("S6").Select
ActiveSheet.Paste
End With