Change coption of a ribbontab |
Post Reply |
Author | |
ruschmeier@truncad.d
Groupie Joined: 12 January 2012 Location: Germany Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 08 March 2013 at 5:31am |
Hi everyone,
I must change the caption of a tab on a commandbars-ribbon. But I cannot find a way to do so. I have tried : Form.CommandBars.FindControl(,ID_TAB_RAUM).caption = "Test" Form.CommandBars.DesignerControls.Find(,ID_TAB_RAUM).caption = "Test" and with both I get an error message: "Objektvariable oder With-Blockvariable nicht gesetzt" (German OS) "Objectvariable or
with-blockvariable not set" (my translation) I hope someone can help me, otherwise all our users have to learn German.... Thanks, Frank |
|
cory
Groupie Joined: 31 August 2004 Location: Italy Status: Offline Points: 26 |
Post Options
Thanks(0)
|
Hi,
A Try with: Form.CommandBars.FindControl(,ID_TAB_RAUM, , True).caption = "Test" you must set the parameter: 'recursive' = true. By Cory |
|
ruschmeier@truncad.d
Groupie Joined: 12 January 2012 Location: Germany Status: Offline Points: 17 |
Post Options
Thanks(0)
|
Hi Cory,
thanks a lot for the reply. Unfortunately I still get the runtime error 91. But at least someone had an idea. The people from codejock do not seem to be too interested in supporting their customers. That's a real pitty, because the control itself is nice. Or does anyone know a way to get an answer from them? Regards, Frank
|
|
MetallDesign
Groupie Joined: 23 September 2008 Location: Switzerland Status: Offline Points: 16 |
Post Options
Thanks(0)
|
hallo frank
habe das gleiche problem. hast du eine lösung gefunden? gruss ramon |
|
ruschmeier@truncad.d
Groupie Joined: 12 January 2012 Location: Germany Status: Offline Points: 17 |
Post Options
Thanks(0)
|
Hallo,
nach einigem Trial & error habe ich eine Lösung gefunden. Public Sub SetCaptionTab(CaptionStr As String, ID_TAB As Long, CaptionJN As Integer, ToolTippJN As Integer) Dim RibbonBar As RibbonBar Dim RibbonTab As RibbonTab Set RibbonBar = Korpus.CommandBars.ActiveMenuBar Set RibbonTab = RibbonBar.FindTab(ID_TAB) If CaptionJN = 1 Then RibbonTab.Caption = CaptionStr If ToolTippJN = 1 Then RibbonTab.ToolTip = CaptionStr End Sub Public Sub SetCaptionGroup(CaptionStr As String, ID_GROUP As Long) Dim RibbonBar As RibbonBar Dim RibbonGroup As RibbonGroup Set RibbonBar = Korpus.CommandBars.ActiveMenuBar Set RibbonGroup = RibbonBar.FindGroup(ID_GROUP) On Error Resume Next RibbonGroup.Caption = CaptionStr On Error GoTo 0 End Sub Public Sub SetCaptionControl(CaptionStr As String, ID_CONTROL As Long, CaptionJN As Integer, DescriptionJN As Integer, ToolTippJN As Integer) Dim RibbonBar As RibbonBar Dim RibbonControl As XtremeCommandBars.CommandBarControl Set RibbonBar = Korpus.CommandBars.ActiveMenuBar Set RibbonControl = RibbonBar.FindControl(, ID_CONTROL, , 1) If CaptionJN = 1 Then RibbonControl.Caption = CaptionStr If DescriptionJN = 1 Then RibbonControl.DescriptionText = CaptionStr If ToolTippJN = 1 Then RibbonControl.ToolTipText = CaptionStr End Sub Das funktioniert jetzt ganz gut. Aber schön wäre es gewesen, wenn Codejock wenigstens reagiert hätte... Gruß, Frank
|
|
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 |