Let us suppose you have 5 groups.
Let us suppose you have 12 selections in your listbox.
Group 1 is allowed to select either of options 1, 5, 7, 8, 11
Group 2 is allowed to select either of options 2, 5, 7, 10
and so on.
Create a variable myGroups(5)
then:
myGroups(1) = "(1), (5), (7), (8), (11)"
myGroups(2) = "(2), (5), (7), (10)"
and so on
Let's say in advance you have the current user group assigned to a variable called G.
Private Sub myListBox_ItemCheck(Item As Integer)
mySelected = "(" & Item & ")"
if instr(myGroups(G), mySelected) = 0 then
myListBox.Selected(Item) = False
end if
End Sub
This forces the check box to remain unchecked even when clicked if the item is not of this group's allowance.
Hope that helps.
Eman_2005
Technical Communicator