Bruce Tjosvold
Use this construction. Change the sheet numbers where I have commented. I have tested the code using my own file paths.
Sub TestThis()
Dim LR As Long
Dim Tester_IDs As Variant
Dim user_name As String
Dim nMatch As Long
user_name = "ANDERSD4"
Workbooks.Open ("\\spnas2\spdept\dept\SAP_TECH\S:\Upload Master Templates\JEMASTER\Bruce_test\Tester_IDs.xlsx")
LR = ActiveWorkbook.Sheets(2).Range("A" & Rows.Count).End(xlUp).Row ''' change the Sheets() num to suit
Set Tester_IDs = ActiveWorkbook.Sheets(2).Range("A1:A" & LR) ''' change the Sheets() num to suit
On Error Resume Next ''' allow for not found
nMatch = WorksheetFunction.Match(user_name, Tester_IDs, 0) + 1
If nMatch > 0 Then
MsgBox "Yes, it is there"
Else
MsgBox "No, not found"
End If
On Error GoTo 0
Workbooks("Tester_IDs.xlsx").Close False ''' remember to close the master template at some stage
Set Tester_IDs = Nothing ''' free up memory
End Sub
Bookmarks