![]() |
SOLVED: Error with v12.0.1 RibbonBar |
Post Reply ![]() |
Author | |
chrisABC ![]() Senior Member ![]() ![]() Joined: 05 June 2008 Status: Offline Points: 258 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
chrisABC ![]() Senior Member ![]() ![]() Joined: 05 June 2008 Status: Offline Points: 258 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
chrisABC ![]() Senior Member ![]() ![]() Joined: 05 June 2008 Status: Offline Points: 258 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |