Can not create context menu ( adxMsoBarPopup position commandbar )

Add-in Express™ Support Service
That's what is more important than anything else

Can not create context menu ( adxMsoBarPopup position commandbar )
 
tetsuji nakaoka




Posts: 3
Joined: 2006-01-22

hi.

I set TadxCommandBar position property to adxMsoBarPopup.

I register addin and run excel.
occured exception. can not create context menu.

tested environment
adx 2.4 build 245
delphi 6 upd2 rtl3
windows 2000 sp4 & excel 2000
Posted 22 Jan, 2006 11:09:38 Top
tetsuji nakaoka




Posts: 3
Joined: 2006-01-22
add information.

I want to write same vba code.
------------------------------

Public Sub CreatePopUpBar()

Dim objBar As CommandBar
Dim objButton As CommandBarButton

Set objBar = Application.CommandBars.Add("TESTPOPUP", msoBarPopup, False, True)

Set objButton = objBar.Controls.Add(msoControlButton)
objButton.Caption = "Test1"

Set objButton = objBar.Controls.Add(msoControlButton)
objButton.Caption = "Test2"

Set objButton = objBar.Controls.Add(msoControlButton)
objButton.Caption = "Test3"

objBar.ShowPopup

End Sub
Posted 22 Jan, 2006 11:16:09 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Tetsuji Nakaoka,

At design-time set the Visible property of your popup command bar to False. To show this command bar use the ShowPopup method (see the example below).

adxCommandBar1.DefaultInterface.ShowPopup(0, 0);

Posted 23 Jan, 2006 08:06:42 Top
tetsuji nakaoka




Posts: 3
Joined: 2006-01-22
Hi Dmitry.

Thanks. good information.
Posted 25 Jan, 2006 05:28:06 Top