R
Ron Matuszek
I've created a custom contact form. I've added controls from the standard
toolbox to the custom page. When I press a button the Script
"CommandButton1_Click" event fires and the subroutine is processed. But, when
I try to capture the change events for a tab strip or a multipage or a spin
button the script doesn't recognize these objects or their events.
For example, in a VBA form the tabstrip fires a TabStrip1_Change event when
you select a diferent tab. I can use the TabStrip1.Value property to
determine which tab is active and update the appropriate controls as needed.
When I try this in the VBScript within the customized Contact form I can't
even read the TabStrip1.Value property. I get an "Object Required" error.
Here's the script:
---------------------------------
Sub CommandButton1_Click()
MsgBox "The Button was clicked." & SpinButton1.Value
End Sub
Sub SpinButton1_Click()
MsgBox "Spin Button Clicked"
End Sub
Sub SpinButton1_Change()
MsgBox "Spin Button Changed"
End Sub
-----------------------------------
When I run the form the Command Button Clink event fires but I get an
"Object Required: 'SpinButton1'" error instead of a message box with the
value of the spin button. The Spin Button Change and Click event handlers are
ignored.
I'm using Outlook 2003. Are the standard controls available in VBScript? If
so, am I trying to access them incorrectly?
toolbox to the custom page. When I press a button the Script
"CommandButton1_Click" event fires and the subroutine is processed. But, when
I try to capture the change events for a tab strip or a multipage or a spin
button the script doesn't recognize these objects or their events.
For example, in a VBA form the tabstrip fires a TabStrip1_Change event when
you select a diferent tab. I can use the TabStrip1.Value property to
determine which tab is active and update the appropriate controls as needed.
When I try this in the VBScript within the customized Contact form I can't
even read the TabStrip1.Value property. I get an "Object Required" error.
Here's the script:
---------------------------------
Sub CommandButton1_Click()
MsgBox "The Button was clicked." & SpinButton1.Value
End Sub
Sub SpinButton1_Click()
MsgBox "Spin Button Clicked"
End Sub
Sub SpinButton1_Change()
MsgBox "Spin Button Changed"
End Sub
-----------------------------------
When I run the form the Command Button Clink event fires but I get an
"Object Required: 'SpinButton1'" error instead of a message box with the
value of the spin button. The Spin Button Change and Click event handlers are
ignored.
I'm using Outlook 2003. Are the standard controls available in VBScript? If
so, am I trying to access them incorrectly?