Hi folks,

I have a listbox in word on a userform.

I would like to run a macro when an item is selected.

This is a multicolumn listbox

And the macro name is in Column 3.

So each row has its own macro i would like to run




How can this be achieved ive looked everywhere and not sure what im doing wrong

ListBox1.List(RowIndex, ColumnIndex)

Private Sub CommandButton1()
 
 Dim i as long
oMacro as string
 
If ListBox1.ListIndex = (i, 2) then 
Call oMacro


 
 '----- Basic Code
If ListBox1.ListIndex = 0 Then
Call  Macro1
End If
If ListBox1.ListIndex = 1 Then
Call Macro2
End If
End Sub
Thank you for tips and advice