I just recorded this macro and paste it into my main code which is inside one of the sheets. When i run it with my code , it throws an error at this point , i dont know why ?.
Any idea ?
Sub pastem()
Windows("Main.xlsm").Activate
Sheets("Work").Select
Range("B6").Select        'error at this position
ActiveSheet.Paste 
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
Application.CutCopyMode = False
Range("B6").Select
End Sub
Thanks
 
     
    