Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This procedure uses the Click event to call CreateItem to create and show an appointment when a user clicks CommandButton1. The example shows how to do this in a custom form page using VBScript.
In design mode:
Using the Control Toolbox, place a CommandButton on your form.
Open the Script Editor. How?
Enter the following code, using the appropriate constant value from the OlItemType enumeration to specify the type of item that you want to create.
Sub CommandButton1_Click
Application.CreateItem(1).Display
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.