8Controls in Word and Excel

It’s a control freak thing. I wouldn’t let you understand.

—S.H. UNDERWOOD

Topics Covered in This Chapter

About Controls

Adding Controls to Toolbars and Menus

Using Windows Forms Controls

Adding Controls to a Windows Form

Adding Controls to the Task Pane

Adding Controls to Excel and Word Documents

Summary

Review Questions

About Controls

Controls are typically used as entry points into your code. To perform actions, end users click a button on a toolbar or choose an item in a combo box on a dialog. Using VBA, you can add controls to your Word and Excel solutions in three ways: by adding them to the CommandBar (toolbar or menu); by creating a dialog box and adding ActiveX controls to a UserForm; or by adding these controls ...

Get VSTO for Mere Mortals™: A VBA Developer’s Guide to Microsoft Office Development Using Visual Studio 2005 Tools for Office now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.