I have 2 excel worksheets (XLpicsWB.Sheets(sMinMaxWs) & ws.) where the cell value in the 1st worksheet may or may not exist in 2nd worksheet. I want to set a check condition if the value (opcTagItem.Value) does not exist in the 2nd worksheet. The "If" statement throws the exception error and I'm not sure how to properly set the check property:
Select Case AnnunciatorBlkSizeCount
Case 1
If XLpicsWB.Sheets(sMinMaxWS).Range("A:A").Find(opcTagItem.Value).Row.Equals(vbNull) Then
ws.Rows(iCurrentRow).Replace(What:=sOldAnnunciatorName, Replacement:=sBaseTagItemName, LookAt:=XlLookAt.xlPart,
SearchOrder:=XlSearchOrder.xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False)
iCurrentRow = iCurrentRow + 1
Exit Select ' Some tag names don't have Min/Max data
End If