Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
This seems like it was going to be easy but I can't figure this out. I want the user to be able to select an action with a SINGLE-CLICK from listbox1, perform the action, and "reset" the selection to listindex=-1 so that the same action can be selected again if desired. I am not certain as to why but the first selected index remains selected despite the line "userform1.listbox1.listindex=-1". Please help. Thanks in advance! I have the following: Private Sub ListBox1_Click() Select Case UserForm1.ListBox1.ListIndex + 1 Case 1 Call action_1 Case 2 Call action_2 Case 3 Call action_3 End Select UserForm1.ListBox1.ListIndex = -1 End Sub Sub procedure1() action_array = Array("action #1", "action #2", "action #3") UserForm1.ListBox1.List = action_array UserForm1.Show End Sub Sub action_1() MsgBox "perform action #1" End Sub Sub action_2() MsgBox "perform action #2" End Sub Sub action_3() MsgBox "perform action #3" End Sub Sub action_1() MsgBox "perform action #1" End Sub Sub action_2() MsgBox "perform action #2" End Sub Sub action_3() MsgBox "perform action #3" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
problem with a conditional max problem | Excel Discussion (Misc queries) | |||
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? | Excel Programming |