|
-
Dec 11th, 2000, 06:20 PM
#1
Thread Starter
New Member
Can anyone tell me why this may not be working? This is VB Script in an outlook form that I have created. When I click on the checkbox, nothing happens. No errors or anything.
Sub checkbox1(value)
If value = -1 Then
Item.GetInspector.ModifiedFormPages("Form").airline.visible = true
Item.GetInspector.ModifiedFormPages("Form").airlinebox.visible = true
Item.GetInspector.ModifiedFormPages("Form").amount.visible = true
Item.GetInspector.ModifiedFormPages("Form").amountbox.visible = true
Else
Item.GetInspector.ModifiedFormPages("Form").frame3.airline.visible = false
Item.GetInspector.ModifiedFormPages("Form").frame3.airlinebox.visible = false
Item.GetInspector.ModifiedFormPages("Form").frame3.amount.visible = false
Item.GetInspector.ModifiedFormPages("Form").frame3.amountbox.visible = false
End If
End Sub
-
Dec 12th, 2000, 07:53 PM
#2
Fanatic Member
If I remember correctly when I tried something similar, the outlook scripting engine doesn't provide a "Click" event of any kind for checkboxes or option buttons. To get around this on the send event we checked the values of each checkbox to determined what needed to be done.
However in your case that's not going to help much, I know. Try posting this in the VB script forum, they maybe able to help a little better.
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Dec 12th, 2000, 08:01 PM
#3
Thread Starter
New Member
I figured it out, by hittin my head on the desk a few times..... Here is what it takes. You need to have a custom property, and you have to follow the object model all the way down to your check box.
Sub Item_CustomPropertyChange(ByVal Value)
If Item.GetInspector.ModifiedFormPages("Form").Invoice.value = -1 Then
Item.GetInspector.ModifiedFormPages("Form").ticket.visible = true
Item.GetInspector.ModifiedFormPages("Form").ticketbox.visible = true
Item.GetInspector.ModifiedFormPages("Form").passenger.visible = true
Item.GetInspector.ModifiedFormPages("Form").passengerbox.visible = true
ElseIf Item.GetInspector.ModifiedFormPages("Form").Invoice.value = 0 Then
Item.GetInspector.ModifiedFormPages("Form").ticket.visible = false
Item.GetInspector.ModifiedFormPages("Form").ticketbox.visible = false
Item.GetInspector.ModifiedFormPages("Form").passenger.visible = false
Item.GetInspector.ModifiedFormPages("Form").passengerbox.visible = false
End if
If Item.GetInspector.ModifiedFormPages("Form").Future.value = -1 Then
Item.GetInspector.ModifiedFormPages("Form").airline.visible = true
Item.GetInspector.ModifiedFormPages("Form").airlinebox.visible = true
Item.GetInspector.ModifiedFormPages("Form").amount.visible = true
Item.GetInspector.ModifiedFormPages("Form").amountbox.visible = true
Elseif Item.GetInspector.ModifiedFormPages("Form").Future.value = 0 Then
Item.GetInspector.ModifiedFormPages("Form").airline.visible = false
Item.GetInspector.ModifiedFormPages("Form").airlinebox.visible = false
Item.GetInspector.ModifiedFormPages("Form").amount.visible = false
Item.GetInspector.ModifiedFormPages("Form").amountbox.visible = false
End If
End sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|