Thanks for responding.....
These are the other 2 subs that handle the Next and Previous buttons in
UserForm13. When I have things set up (prior to trying the ForEach) ,
everything worked ok. The user could hit Next over and over, same with
the Previous button, and it would work fine.
What I'm trying to do is to be able to show a number in TextBox16
that will show which record the user is looking at. I already have
TextBox15 which shows the total records found in the initial Find. That
code is under the 2 subs. I wanted to assign a number to each record
found. That number would show up in TextBox16. 1st record = 1, 2nd
record = 2, etc.
Whatever help you can offer, I would appreciate.
Thanks,
J.O.
Sub TestFindNext_POCurrent()
Worksheets("Official List").Activate
Set rngFound = rngToSearch.FindNext(rngFound)
rngFound.Select
If rngFound.Address = strFirst Then
MsgBox "There are no other records with this PO/PL."
Else
Unload UserForm13
UserForm13.Show
End If
End Sub
********************************
Sub TestFindPrevious_POCurrent()
Worksheets("Official List").Activate
Set rngFound = rngToSearch.FindPrevious(rngFound)
rngFound.Select
Unload UserForm13
UserForm13.Show
End Sub
'Counter for how many of this PO/PL there are on the list
'This goes in TextBox15
CountPO = Application.CountIf(Range("J:J"), FindPOVal)
TextBox15.Value = CountPO
Bookmarks