I have an excel User form containing the following objects.
1. 2 option buttons (Name of Option Button1=Admin, Name of Option Button2=Operation)
2. 1 List Box
3. 2 List on Excel Sheet Name Admin and Operation
I want that if someone select Option Button1(Admin) the List Box Show only the Admin List and similarly if someone select Option Button2(Operation),list box show only Operation List
In my mind I have the following code but it is not working
Also please let me know that where to put this code.
Thanks
1. 2 option buttons (Name of Option Button1=Admin, Name of Option Button2=Operation)
2. 1 List Box
3. 2 List on Excel Sheet Name Admin and Operation
I want that if someone select Option Button1(Admin) the List Box Show only the Admin List and similarly if someone select Option Button2(Operation),list box show only Operation List
In my mind I have the following code but it is not working
Code:
If OptionButton5 = True Then
ListBox1.RowSource = "Admin"
Else if OptionButton6 = True then
ListBox1.RowSource = "operation"
End if
Thanks