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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top