Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Error 438 Object doesn't support this property
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Error 438 Object doesn't support this property

 Post Reply Post Reply
Author
Message
Biox View Drop Down
Groupie
Groupie


Joined: 14 September 2009
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Biox Quote  Post ReplyReply Direct Link To This Post Topic: Error 438 Object doesn't support this property
    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


Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2011 at 4:39am
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)
Back to Top
Biox View Drop Down
Groupie
Groupie


Joined: 14 September 2009
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Biox Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2011 at 7:40pm
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")




Back to Top
Biox View Drop Down
Groupie
Groupie


Joined: 14 September 2009
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Biox Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2011 at 9:59pm
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  :)

Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 24 February 2011 at 3:32am
Hi,

Use this code in v13.2.1 and it will work fine...


    Set ControlPopup = .Add(xtpControlSplitButtonPopup, ID_FILE_PRINT, "&Print")
        ControlPopup.BeginGroup = True
    Set PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage")
    Set ControlPopup.CommandBar = PopupBar


Here it is in your sample code:


    Dim RibbonBar As RibbonBar
    Set RibbonBar = CommandBars.AddRibbonBar("The Ribbon")
    RibbonBar.EnableDocking xtpFlagStretched
    RibbonBar.ShowQuickAccess = False
   
    Dim ControlFile As CommandBarPopup
    Dim Control As CommandBarControl
    Dim PopupBar As CommandBar
    Dim TabWrite As RibbonTab
   
    Dim ControlPopup As CommandBarPopup
   
    Set ControlFile = RibbonBar.AddSystemButton()
    ControlFile.IconId = ID_SYSTEM_ICON
    ControlFile.Caption = "&File"
    ControlFile.CommandBar.SetIconSize 32, 32
   
    With ControlFile.CommandBar.Controls
   
        Set Control = .Add(xtpControlButton, ID_FILE_USERS, "&Users")
          
        Set Control = .Add(xtpControlSplitButtonPopup, ID_FILE_DRIVES, "&Drives")
            Control.BeginGroup = True

        Set ControlPopup = .Add(xtpControlSplitButtonPopup, ID_FILE_PRINT, "&Print")
            ControlPopup.BeginGroup = True
        Set PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage")
        Set ControlPopup.CommandBar = PopupBar

       
        Set Control = ControlPopup.Controls.Add(xtpControlLabel, 0, "Create and DisMount Drives")
    End With


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)
Back to Top
Biox View Drop Down
Groupie
Groupie


Joined: 14 September 2009
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Biox Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2011 at 3:36am
Thank you Xander7,  that fixed the problem for me.


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.187 seconds.