I have 3 worksheets, Inventory Count, Issuance Count and Stock. They look something like this:

So, I am trying to concatenate the Sample numbers in Inventory and Issuance count, and then trying to apply advanced filter to get unique sample numbers in the stock sheet. Here is my code:
Sub Stock1()
Dim wbData As Range
Dim wbData2 As Range
Dim unionData As Range
Dim lastrow As Long
Dim lastrow2 As Long
lastrow = WorksheetFunction.CountA(ThisWorkbook.Worksheets("Issuance").Range("B:B")) + 2
lastrow2 = WorksheetFunction.CountA(ThisWorkbook.Worksheets("Inventory").Range("B:B")) + 2
Set wbData = ThisWorkbook.Worksheets("Inventory").Range("B3:B" & lastrow)
Set wbData2 = ThisWorkbook.Worksheets("Issuance").Range("B3:B" & lastrow2)
Set unionData = Union(wbData, wbData2)
Set wbExtract = ThisWorkbook.Worksheets("Stock").Range("B1")
unionData.AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=wbExtract, Unique:=True
'Dim lastrow3 As Long
'lastrow3 = WorksheetFunction.CountA(ThisWorkbook.Worksheets("Stock").Range("B:B"))
End Sub
But this is giving me the error in the union line and it says: "Method union of object Global failed error".
Please help, if there is a better other way to achieve the task, I am open to do that as well. Thanks in advance
With Worksheet("Sheet2"): WsData.Copy Destination:= .Cells(.Rows.Count, "A").End(xlUp).Offset(1): End Withand now both ranges are joined in column A of Sheet2 underneath each other.