trying to copy data from user workbook to master workbook, code was running good but all of sudden it started throwing the error " paste special method of range class failed " when I check, I found that when I am asking VBA to open my master file "marching ants" around the copied range from user file disappear. please suggest how can i solve this issue
Sub trail13()
Dim WB As ThisWorkbook
Dim s As Worksheet
Dim wbo As Workbook
Dim so As Worksheet
Dim cell As Range
Dim r As Range
Dim W As Range, lastclm As Long, lastrow As Long
Dim source As Range
Dim msource As Range
Dim k As Long
Dim m As Integer
Dim d As Long
Dim z As Long
Dim q As Long
Dim w2 As Range
Dim x As Range
Dim y As Long
Dim mlkup As Range
Cells.Find("Wuerth Art No").Select
Set s = ActiveSheet
Set W = ActiveCell
lastrow = s.Cells(s.Rows.Count, W.Column).End(xlUp).Row
lastclm = s.Cells(W.Row, s.Columns.Count).End(xlToLeft).Column
Set source = s.Range(W, Cells(lastrow, lastclm)) 'source for vlookup
Set msource = s.Range(W, Cells(W.Row, lastclm)) 'source for match function
W.Offset(1, 0).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Application.DisplayAlerts = False
On Error Resume Next
Excel.Workbooks.Open ("F:\VBA\New folder\attachments\offer Master of all Customer.xlsx")
Windows("offer master of all customer").Activate
On Error GoTo 0
Set wbo = Workbooks("offer master of all customer")
Set so = wbo.ActiveSheet
so.Cells.Find("WAN").Activate
Range("D" & Rows.Count).End(xlUp).Select
Application.CutCopyMode = True
ActiveCell.Offset(1, 0).Range("A1").PasteSpecial xlPasteFormats
'ActiveCell.Offset(1, 0).PasteSpecial 'wan paste from user file