Using events in VBA

From Ribbon Commander Documentation
Revision as of 17:04, 17 March 2013 by Rxdff15551 bb53 (Talk | contribs) (Introduction)

Jump to: navigation, search

Prerequisites

We recommend you go though Creating an rxCustomUI object with local dispatch scope in VBA before going into this example.

Introduction

All Dynamic RibbonX controls that model UI elements with delegates support VBA events. In order to subscribe to events in VBA we need to write our UI code in a VBA class. Since we are using events instead of delegates, the dispatch scope of our customUI is irrelevant.

Subscribing to control events

  • Add a new class to your VBA project and name it clsEventsDemoUI
  • Enter the following code to the class module