Difference between revisions of "Getting started in VBA"

From Ribbon Commander Documentation
Jump to: navigation, search
(Writing some code!)
(Writing some code!)
Line 17: Line 17:
 
* [[A 'hello world' VBA program]]
 
* [[A 'hello world' VBA program]]
 
* [[Creating our first button in VBA]]
 
* [[Creating our first button in VBA]]
* [[Creating a new global context in VBA]]
+
* [[Creating an rxCustomUI object with global dispatch scope in VBA]]
 
* [[Creating an rxCustomUI object with local dispatch scope in VBA]]
 
* [[Creating an rxCustomUI object with local dispatch scope in VBA]]

Revision as of 18:24, 14 March 2013

Prerequisites

Before you get started install Dynamic RibbonX on your PC (see Installation)

Referencing the library

  1. Create a new project in your favourite office application
  2. Add a VBA reference to the Dynamic RibbonX library (Tools->References)
    VBAReference.png
  3. The library is now ready to use. In the immediate window enter
    ?rxCustomUI.defaultInstance.targetOfficeVersion
    This should print the major version of the office platform you are using. If you are running in an older version of office you will get a runtime error instead (the error message here is for excel)
    UnsupportedExcelVersion.png

Writing some code!

It is recommended that you go through the examples below in the order in which they appear, as each example builds up on previous ones.