• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 18. Event Handling in the Visio ... > VBA Code Behind Events for ActiveX C...

VBA Code Behind Events for ActiveX Controls

Beginning with Visio 5.0, any page in a Visio document can host ActiveX controls. Visio is now configured with two distinct modes: a Design mode and a Run mode. To expose this feature, enable the Developer toolbar. On this toolbar you will see a button that looks like a triangle, Ruler and Pencil. This is the Design/Run mode toggle button. When the button is raised, you are in Run mode; when it is pressed, you are working in Design mode. While in Design mode, you can place ActiveX controls onto a diagram's page, reposition the control, resize the control, and set properties of the control. While in Run mode, you or your users can interact with the control just as you would with any other ActiveX Control, such as in a Visual Basic application. The diagram must be in Run mode in order for the associated events to fire and an application to have the ability to access the methods and properties of the control.

Here is a small demonstration for you to try.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint