Skip to Content
Excel® 2013 On Demand
book

Excel® 2013 On Demand

by Perspection Inc. Steve Johnson
February 2013
Beginner to intermediate
576 pages
21h 30m
English
Que
Content preview from Excel® 2013 On Demand

Adding VBA Code to an ActiveX Control

After you add controls and set properties, you can add VBA code to a module to determine how the controls respond to user actions. All controls have a predefined set of events. For example, a command button has a Click event that occurs when the user clicks the button. When you select a control in Design Mode and then click the View Code button, the Visual Basic Editor opens with a Code window, displaying the start of a procedure that runs when the event occurs. The top of the Code window displays the active object and event procedure. The Object list displays the ActiveX control, such as CommandButton1, and the Procedure list displays the trigger event, such as Click.

Add VBA Code to an ActiveX Control ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Excel® 2013 In Depth

Excel® 2013 In Depth

Bill Jelen

Publisher Resources

ISBN: 9780133353136Purchase book