View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
excelnut1954 excelnut1954 is offline
external usenet poster
 
Posts: 175
Default Adding a Next Record button to UserForm

After looking at the example for FindNext in VBA Help, I'm thinking I
should find a way to have the macro 1st find each PO on the list, based
on the user's request in the 1st userform.

This is what I have in the userform code , for when the user gives the
PO he wants to find.

Private Sub TextBox1_Change()

FindPOVal = TextBox1.Value
End Sub

I'm thinking that the macro needs to then go through the list, and give
a variable name to each of the records with that PO# found. Would that
work? Would the variable names given to each record be distinct to each
other, even though the PO numbers will be exactly the same? That is,
PO# 112 on line 10 on the list given variable name A
PO# 112 on line 20 on the list given variable name B
Would any code that references variable B cause it to only look at the
PO on line 20? And, not the same PO# on line 10? OR, would the
variable be given to the whole line for each record?
Thanks,
J.O.