Creating our first button in VBA
From Ribbon Commander Documentation
Revision as of 18:06, 10 March 2013 by Rxdff15551 bb53 (Talk | contribs) (Created page with "== Prerequisites == We recommend you go though A 'hello world' VBA program before going into this example. == Creating a button == <syntaxhighlight lang="vb" line> Public...")
Prerequisites
We recommend you go though A 'hello world' VBA program before going into this example.
Creating a button
Public Sub CreateMyUI()
With rxCustomUI.defaultInstance
' Clear old state
.Clear
' Add a new tab
With .ribbon.tabs.Add(New rxTab)
.Label = "My First Tab"
' Add a new group to our tab
With .groups.Add(New rxGroup)
.Label = "My Group"
' Add a new button to our group
With .Buttons.Add(New rxButton)
.Label = "My Button"
End With
End With
End With
' Render the UI
.Refresh
End With
End Sub