K
Karl-thomas.schmidt
Hi @ all
wrote some code who ties a popupmenu to a dblclick of a
listbox. the listbox
is filled with values from a table
dim Taxis as Worksheet
set Taxis = Worksheets("table"
Dim myBar As CommandBar
Dim myBttn As CommandBarButton
CommandBars("myKontext").Delete
On Error GoTo handler
Set myBar = Application.CommandBars.Add("myKontext",
msoBarPopup)
Do Until IsEmpty(Taxis.Cells(i, 1))
Set myBttn = myBar.Controls.Add
myBttn.Caption = Taxis.Cells(i, 1).Value
i = i + 1
Loop
This seems to be OK
in the form the contextmenu is linked to the listfield
with:
Private Sub lstAktAuftraege_DblClick(ByVal Cancel As
MSForms.ReturnBoolean)
CommandBars("myKontext").ShowPopup
End Sub
this leeds to a runtime error 80004005
any ideas?
any samples?
best regards..
Kalle
wrote some code who ties a popupmenu to a dblclick of a
listbox. the listbox
is filled with values from a table
dim Taxis as Worksheet
set Taxis = Worksheets("table"
Dim myBar As CommandBar
Dim myBttn As CommandBarButton
CommandBars("myKontext").Delete
On Error GoTo handler
Set myBar = Application.CommandBars.Add("myKontext",
msoBarPopup)
Do Until IsEmpty(Taxis.Cells(i, 1))
Set myBttn = myBar.Controls.Add
myBttn.Caption = Taxis.Cells(i, 1).Value
i = i + 1
Loop
This seems to be OK
in the form the contextmenu is linked to the listfield
with:
Private Sub lstAktAuftraege_DblClick(ByVal Cancel As
MSForms.ReturnBoolean)
CommandBars("myKontext").ShowPopup
End Sub
this leeds to a runtime error 80004005
any ideas?
any samples?
best regards..
Kalle