Error 438 Object doesn't support this property |
Post Reply |
Author | ||
Biox
Groupie Joined: 14 September 2009 Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 22 February 2011 at 4:07am |
|
Thank for reading,
Line 200 is giving me an error as "Error 438 Object doesn't support this property or method" Appreciate your help as I am sure this was working previously in this project. I've migrated to a new machine and cannot compile this. thanks Dim RibbonBar As RibbonBar 80 Set RibbonBar = CommandBars.AddRibbonBar("The Ribbon") 90 RibbonBar.EnableDocking xtpFlagStretched 100 RibbonBar.ShowQuickAccess = False Dim ControlFile As CommandBarPopup Dim Control As CommandBarControl Dim PopupBar As CommandBar Dim TabWrite As RibbonTab 110 Set ControlFile = RibbonBar.AddSystemButton() 120 ControlFile.IconId = ID_SYSTEM_ICON 130 ControlFile.Caption = "&File" 140 ControlFile.CommandBar.SetIconSize 32, 32 150 With ControlFile.CommandBar.Controls 160 Set Control = .Add(xtpControlButton, ID_FILE_USERS, "&Users") 170 Set Control = .Add(xtpControlSplitButtonPopup, ID_FILE_DRIVES, "&Drives") 180 Control.BeginGroup = True 190 Set PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage") 200 Set Control.CommandBar = PopupBar |
||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
|
Hi,
The reason for this issue is due to the way in which you are declaring the variables used! You are using the "Dim Control As CommandBarControl" therefore you cannot assign the PopupBarCommandBar to this. What you must do is use a variable "Dim ControlPopup As CommandBarPopup" instead. See the MDI Ribbon sample for this. |
||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
||
Biox
Groupie Joined: 14 September 2009 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
|
Thanks for the reply,
The confusing thing for me is that this was working fine in V11 but has thrown this error when we upgraded to V13. I have tried the mod as you suggested but now I get Error 13 type mismatch on line 190 per below. I'll fiddle some more but if you have a thought on this I'd appreciate it. thanks Dim RibbonBar As RibbonBar 80 Set RibbonBar = CommandBars.AddRibbonBar("The Ribbon") 90 RibbonBar.EnableDocking xtpFlagStretched 100 RibbonBar.ShowQuickAccess = False Dim ControlFile As CommandBarPopup Dim Control As CommandBarControl Dim PopupBar As CommandBar Dim TabWrite As RibbonTab Dim ControlPopup As CommandBarPopup 110 Set ControlFile = RibbonBar.AddSystemButton() 120 ControlFile.IconId = ID_SYSTEM_ICON 130 ControlFile.Caption = "&File" 140 ControlFile.CommandBar.SetIconSize 32, 32 150 With ControlFile.CommandBar.Controls 160 Set Control = .Add(xtpControlButton, ID_FILE_USERS, "&Users") 170 Set Control = .Add(xtpControlSplitButtonPopup, ID_FILE_DRIVES, "&Drives") 180 Control.BeginGroup = True ' 190 Set PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage") 190 Set ControlPopup = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage") '200 Set Control.CommandBar = PopupBar 200 Set Control.CommandBar = ControlPopup '210 Set Control = PopupBar.Controls.Add(xtpControlLabel, 0, "Create and DisMount Drives") 210 Set Control = ControlPopup.Controls.Add(xtpControlLabel, 0, "Create and DisMount Drives") |
||
Biox
Groupie Joined: 14 September 2009 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
|
As an update to this, I have just reinstalled V11.2.2 and recompile fine. Crashes on 13.2.1
The app runs perfectly using 11.2.2. So something fishy is going on :) |
||
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
|
Hi,
Use this code in v13.2.1 and it will work fine...
Here it is in your sample code:
Basically when major versions of software change there may be some changes to the way in which it previously worked. All I did was look at the sample code to get this working! |
||
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
||
Biox
Groupie Joined: 14 September 2009 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
|
Thank you Xander7, that fixed the problem for me.
|
||
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 |