Hi
I have a long list of numbers in a combobox
The combobox is populated with above code.
I use the combobox to assign a number to userprofiles... the numbers is added to a table row that represent a user.
But i want to prevent that i select the same value twice.
For example
This is the combobox values:
1
2
3
4
5
I first select value 1 and press my save button.
Then the value is posted into my table on the row for the user i am working on.
All this works now.
But if i open a second user and select the value 1 again... i want a "warning" that this value is already in use on another row in the table.
I have a long list of numbers in a combobox
Code:
Dim passk As Range
With Sheets("Resurser")
UserForm4.ComboBox_kortnummer.Clear 'clear listbox
For Each passk In .Range("l3", .Range("l" & Rows.Count).End(xlUp))
If passk.Value <> "" Then UserForm4.ComboBox_kortnummer.AddItem passk.Value
Next passk
End With
I use the combobox to assign a number to userprofiles... the numbers is added to a table row that represent a user.
But i want to prevent that i select the same value twice.
For example
This is the combobox values:
1
2
3
4
5
I first select value 1 and press my save button.
Then the value is posted into my table on the row for the user i am working on.
All this works now.
But if i open a second user and select the value 1 again... i want a "warning" that this value is already in use on another row in the table.