I've created a macro to check text in a Purchase Order (Copied into a sheet "PO_Text") and return certain values from the text. The following code works well on a number of PC's, but not on some. When running the macro, I get the Runtime Error '9' Subscript out of range on the highlighted line. I've not been able to replicate the error on my PC and the users that experiences the issue work remotely, so difficult to do fault finding.
Any ideas as to what the problem is are welcome.
Sub Check_PO()
'
' Check_PO Macro
'
Sheets("PO_Check_Report").Activate
Range("B3:B4").ClearContents
Rows("8:4000").ClearContents
Sheets("PO_text").Select
LastRow = Worksheets("PO_text").Range("A24000").End(xlUp).Row
MasterListLastRow = Worksheets("Master_List").Range("B3").End(xlDown).Row
NotFoundNextRow = Worksheets("PO_Check_Report").Range("A6").End(xlDown).Row + 1
FoundDifNextRow = Worksheets("PO_Check_Report").Range("D6").End(xlDown).Row + 1
FoundOKNextRow = Worksheets("PO_Check_Report").Range("G6").End(xlDown).Row + 1
' Find PO Number in text
Cells(1, 1).Activate
Cells.Find(What:="PO Number", After:=ActiveCell, LookIn:=xlFormulas2, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(1, 0).Activate
Purch_No = InStr(1, ActiveCell.Value, "/", vbTextCompare)
PO_Number = Left(ActiveCell.Value, Purch_No - 2)
Sheets("PO_Check_Report").Range("B3").Value = PO_Number
Sheets("PO_Check_Report").Range("B4").Value = Now()
Bookmarks