Difference between revisions of "A 'hello world' VBA program"

From Ribbon Commander Documentation
Jump to: navigation, search
(Created page with "== Creating a tab <syntaxhighlight lang="vb"> Public Sub CreateMyUI() ' Get a reference to the default rxCustomUI instance Dim myCustomUI As rxCustomUI Set my...")
 
Line 1: Line 1:
== Creating a tab
+
== Creating a tab ==
 
<syntaxhighlight lang="vb">
 
<syntaxhighlight lang="vb">
 
Public Sub CreateMyUI()
 
Public Sub CreateMyUI()

Revision as of 16:52, 10 March 2013

Creating a tab

Public Sub CreateMyUI()
 
    ' Get a reference to the default rxCustomUI instance
    Dim myCustomUI As rxCustomUI
    Set myCustomUI = rxCustomUI.defaultInstance
 
    ' Create a new tab
    Dim myTab As rxTab
    Set myTab = rxCustomUI.defaultInstance.ribbon.tabs.Add(New rxTab)
 
    ' Give the new tab a label
    myTab.Label = "My First Tab"
 
 
    ' Render the UI
    myCustomUI.Refresh
 
End Sub