good evening everyone
the following code run fine in excel 365, but throws up a "subscript out of range error" when run in 2007. what must be changed so that it will run in 2007?
the following code run fine in excel 365, but throws up a "subscript out of range error" when run in 2007. what must be changed so that it will run in 2007?
VBA Code:
' Check if "Pos" is found in range A1:A14
Sheets("Cabinets").Select
Set rng = Range("A1:A14").Find(What:="Pos", After:=Range("A1"), LookIn:=xlFormulas2, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
If rng Is Nothing Then
MsgBox "Position numbers are not present-- select ""with Position"" from Winner, re-print the element list and convert to Excel", vbOK + vbCritical
If rng Is Nothing Then
Application.Quit
End If
End If