SOLVED: Error with v12.0.1 RibbonBar
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11421
Printed Date: 07 November 2025 at 5:13pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: SOLVED: Error with v12.0.1 RibbonBar
Posted By: chrisABC
Subject: SOLVED: Error with v12.0.1 RibbonBar
Date Posted: 13 July 2008 at 9:15am
The following code (taken from the Ribbon Sample) worked OK in my program with v12.0.0 (in the Create ribbonBar sub)
Set ControlFile = RibbonBar.AddSystemButton() . . . . With ControlFile.CommandBar.Controls Set ControlPrint = .Add(xtpControlsplitButtonPopup, ID_FILE_PRINT, "Print") Set PopupBar = commandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage") Set ControlPrint.CommandBar = PopupBar
After I updated to v12.0.1 The program stops on the last line with. Error 438 "Object doesn't support this property or method"
-------------------------------------------------------------------------------- However, the Ribbon Sample still runs OK with v12.0.1 so there must be something else (not the above code) that is affecting it.
Any ideas? If not I shall have to start comparing the Ribbon Sample with my own code to see what is different.
(SOLVED: with v12.0.1 ControlPrint must be Dim as CommandBarPopup (with v12.0.0 it could be dim as CommandBarControl))
------------- Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
Replies:
Posted By: chrisABC
Date Posted: 13 July 2008 at 6:32pm
Just to confirm this.
I uninstalled v12.0.1 and then installed v 12.0.0 My programs then run OK.
Uninstalled v12.0.0 and then installed 12.0.1 My program now reports error 438 "Object doesn't support property....
------------- Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
Posted By: chrisABC
Date Posted: 13 July 2008 at 7:24pm
The solution is in the Dim statement.
in v12.0.0 this works OK. Dim ControlPrint as CommandBarControl
but in v12.0.1 this must be changed to: Dim ControlPrint as CommandBarPopup
The rest of the code is: Set ControlFile = RibbonBar.AddSystemButton() . . . . With ControlFile.CommandBar.Controls Set ControlPrint = .Add(xtpControlsplitButtonPopup, ID_FILE_PRINT, "Print") Set PopupBar = commandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage") Set ControlPrint.CommandBar = PopupBar
With this change to the Dim statement, my program runs OK under v12.0.1
------------- Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
|