brianfosterblack
Active Member
- Joined
- Nov 1, 2011
- Messages
- 251
I am using this code to select a name from a list of names in a form and add the selected name to another list of names. The other list of names actually starts in row 14 not row 12.
' Application.Goto Reference:="R12C7"
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaLocal = FrmSelectShooter.ListBox1.Value'
What I need help with is a check that if the name is already in the other list of names between row 12 and the row where I wish to add the selected name, then I must get a message that the name is already in the list and when selecting "Ok" on the message it must not enter the name in the row and simply continue with the rest of the code.
Can someone please help.
' Application.Goto Reference:="R12C7"
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.FormulaLocal = FrmSelectShooter.ListBox1.Value'
What I need help with is a check that if the name is already in the other list of names between row 12 and the row where I wish to add the selected name, then I must get a message that the name is already in the list and when selecting "Ok" on the message it must not enter the name in the row and simply continue with the rest of the code.
Can someone please help.