Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi ,
i have created list box dynamically in the sheet in each row. now i wnat that rather then coding for each event of the list box, i shd be able to handle one event for each list box... is it possible ? i have created list box on excel sheet not on form. please suggest me something. jigs d |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you used a listbox from the Forms toolbar, you can assign the same macro to
each listbox. If you used a listbox from the control toolbox toolbar, each listbox will have its own event. But each of those events could call a common procedure. Just pass it whatever you need. Option Explicit Private Sub ListBox1_Click() Call CommonProc(Me.ListBox1) End Sub Private Sub ListBox2_Click() Call CommonProc(Me.ListBox2) End Sub Sub CommonProc(myLB As msforms.ListBox) MsgBox myLB.ListIndex End Sub jigs wrote: hi , i have created list box dynamically in the sheet in each row. now i wnat that rather then coding for each event of the list box, i shd be able to handle one event for each list box... is it possible ? i have created list box on excel sheet not on form. please suggest me something. jigs d -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
do events? background events | Excel Programming | |||
UserForm ListBox Events | Excel Programming | |||
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) | Excel Programming | |||
Help with listbox control events | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming |