Microsoft KB Archive/194211

= FP98: How to Add a Script to the ActiveX Calendar Control =

Article ID: 194211

Article Last Modified on 8/27/2007

-

APPLIES TO


 * Microsoft FrontPage 98 Standard Edition

-



This article was previously published under Q194211



For a Microsoft FrontPage 2000 version of this article, see 205686.

For a Microsoft FrontPage 97 version of this article, see 164620.



SUMMARY
The ActiveX Calendar Control provides a way of displaying calendar-related events on a Web page. ActiveX Controls may be combined to add greater functionality to your Web pages than would be possible with a single control.

NOTE: Microsoft Office 97 installs the ActiveX Calendar Control. If you do not have Microsoft Office installed, the Calendar Control may not appear in the Pick A Control list.



MORE INFORMATION
ActiveX Controls are a suite of products and technologies that support Web development and enable software components to interact with one another. ActiveX Controls are built on the Component Object Model.

For more information about ActiveX Controls, please see the following Microsoft World Wide Web site:

http://www.microsoft.com/activex/gallery

For more information about Visual Basic Scripting, please see the following Microsoft World Wide Web site:

http://www.microsoft.com/technet/scriptcenter/default.mspx

To display the date you selected in a message box, follow these steps:  Open a Web page in FrontPage Editor. On the Insert menu, point to Advanced, and then click Script. Click VBScript and click OK. On the Insert menu, point to Advanced, and then click ActiveX Control. In the Pick A Control list, click Calendar Control. In the Name box, type the name you want to use for this control. For example, type Calendar1. Click OK.</li> Right-click the Calendar Control object, and then click Script Wizard.

The Script Wizard appears. It is divided into three panes: the Event pane (left side), the Action pane (right side), and the Script pane (bottom).</li> In the Script Wizard dialog box, click Code View.</li> In the Event pane, double-click the Calendar1 icon. Select the Click event.</li>  In the Action pane, double-click the Window icon. Double-click the Alert icon.

The following code appears in the Script pane: Sub Calendar1_Click call window.alert(msg) </li>  In the Script pane, delete msg. With the insertion point between the parentheses, double-click the Calendar1 icon in the Action pane, and then double-click Value. The code should now look like this: Sub Calendar1_Click call window.alert(Calendar1.Value) </li> Click OK.</li></ol>

Additional query words: scripting controlling active x

Keywords: kbhowto KB194211

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.