Paul McFedries' Web Home


VBA Unleashed cover Visual Basic for Applications Unleashed

Chapter 21—Web Page Programming: ActiveX and VBScript

Go To VBA Unleashed Home Page Go To Top Go To Prev Go To Next

An Easier Way: The ActiveX Control Pad

At this point, you're probably wondering if ActiveX is worth the trouble. After all, who has the time (or the inclination) to track down CLSIDs for every object you use? And how are you supposed to know which properties are supported by which objects?

To solve these problems and encourage people to use ActiveX controls, Microsoft created a handy tool called the ActiveX Control Pad, included with Internet Explorer 3. You can also download the ActiveX Control Pad separately from Microsoft's FTP site:

ftp://ftp.microsoft.com/developr/MSDN/CPAD/SETUPPAD.EXE

The idea behind the ActiveX Control Pad is to give you an easy, graphical way to insert ActiveX objects and adjusting their properties. In fact, the ActiveX Control Pad works a lot like Word's Form Design mode. In other words, you just select the object you want to insert, use the mouse to size the object as needed, and display its properties sheet to set up the parameters to your liking. When you're done, ActiveX Control Pad inserts the <OBJECT> tag—complete with the correct CLSID—and any required <PARAM> tags. That's a big improvement over coding controls by hand, but the ActiveX Control Pad offers even more advantages:

  • A separate component called the HTML Layout Control makes it easy to position ActiveX controls accurately. You can even save these layouts and reuse them in other Web pages.
  • The ActiveX Control Pad is really just a text editor (albeit a powerful one), so you can tweak other HTML tags at will.
  • You can use VBScript or JavaScript to control ActiveX objects programmatically. There is even a Script Wizard that you can use to get up to speed quickly.
Go To VBA Unleashed Home Page Go To Top Go To Prev Go To Next

Copyright © 1995-2008 Paul McFedries and Logophilia Limited