OnAction and msoControlSplitDropdown

A

Alex

Hello,

I am trying to hook the OnAction of a ControlSplitDropdown button.

Code:

Dim ctl As CommandBarComboBox
For Each ctl In CommandBars.FindControls(Type:=msoControlSplitDropdown, id:=128)
ctl.OnAction = "SplitAction"
Next

and:

Sub SplitAction()
MsgBox "hi"
End Sub

Unfortunately, this gives me Run-time error '438' (Object doesn't support this property or method.)

What am I doing wrong?


Best wishes,
Alex.
 
T

Tony Jollans

What am I doing wrong?

Everything and nothing!

If it were possible you would be doing it correctly. Unfortunately it is
virtually impossible to do anything with split dropdowns.

--
Enjoy,
Tony


Hello,

I am trying to hook the OnAction of a ControlSplitDropdown button.

Code:

Dim ctl As CommandBarComboBox
For Each ctl In CommandBars.FindControls(Type:=msoControlSplitDropdown,
id:=128)
ctl.OnAction = "SplitAction"
Next

and:

Sub SplitAction()
MsgBox "hi"
End Sub

Unfortunately, this gives me Run-time error '438' (Object doesn't support
this property or method.)

What am I doing wrong?


Best wishes,
Alex.
 
A

Alex

Hello Tony,

Tony Jollans said:
Everything and nothing!

If it were possible you would be doing it correctly. Unfortunately it is
virtually impossible to do anything with split dropdowns.

Curses, foiled again!


Best wishes,
Alex.
 
Top