PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Re: Check Boxes

Reply

Re: Check Boxes

 
Thread Tools Rate Thread
Old 25-09-2003, 09:18 PM   #1
Sue Mosher [MVP]
Guest
 
Posts: n/a
Default Re: Check Boxes


You need to rewrite the procedure to work with the property values, as described at http://www.slipstick.com/dev/propsyntax.htm. Name is the changed property name, not the name of the control. The controls con't enter into it at all.

Sub Item_CustomPropertyChange(ByVal Name)
Select Case Name
Case "Prop1"
If Item.UserProperties("Prop1") Then
MsgBox "The value for Prop1 is True"
End If
Case "Prop2"
' etc.
End Sub

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Wanda" <wanda.moyer@pwgsc.gc.ca> wrote in message news:1e1301c3839c$8067f7e0$a001280a@phx.gbl...
> I am missing something here and not sure what. I want a
> bound check box to do something if True and another thing
> if False. If I had coding as below, what am I missing?
> Thanks. Wanda
> *****************
>
> Sub Item_CustomPropertyChange(ByVal Name)
> Dim chkTest
> Set chkTest = Item.GetInspector.ModifiedFormPages
> ("P.2").chkTest
>
> Select Case Name
> Case "chkTest"
> Set chkTest = Item.GetInspector.ModifiedFormPages
> ("P.2").chkTest
> If chkTest.Value = True Then
> msgbox "Hi there"
> End If
> End Select
> End Sub
>

  Reply With Quote
Old 29-09-2003, 04:47 PM   #2
Wanda
Guest
 
Posts: n/a
Default Re: Check Boxes

Sorry Sue. I combined the "chk" and the "cbo" items and
it is working now. Not sure why it wasn't working
before. Just the same, I have my answers. Thanks for
your help. As always, you are AWESOME!!!

Wanda
>-----Original Message-----
>I rewrote the procedure as you have described below
>(having bound items with True/False values) and it does
>not work now. Can you have two Sub
>Item_CustomPropertyChange functions within the same

form?
>Is there some kind of code that I am missing for this to
>fire? In reading your link, I am thinking the item has

to
>be identified that it is a USERPROPERTY? Thanks.
>
>Wanda
>
>>-----Original Message-----
>>You need to rewrite the procedure to work with the

>property values, as described at
>http://www.slipstick.com/dev/propsyntax.htm. Name is the
>changed property name, not the name of the control. The
>controls con't enter into it at all.
>>
>>Sub Item_CustomPropertyChange(ByVal Name)
>> Select Case Name
>> Case "Prop1"
>> If Item.UserProperties("Prop1") Then
>> MsgBox "The value for Prop1 is True"
>> End If
>> Case "Prop2"
>> ' etc.
>>End Sub
>>
>>--
>>Sue Mosher, Outlook MVP
>>Outlook and Exchange solutions at

http://www.slipstick.com
>>Author of
>> Microsoft Outlook Programming: Jumpstart
>> for Administrators, Power Users, and Developers
>> http://www.outlookcode.com/jumpstart.aspx
>>
>>
>>"Wanda" <wanda.moyer@pwgsc.gc.ca> wrote in message

>news:1e1301c3839c$8067f7e0$a001280a@phx.gbl...
>>> I am missing something here and not sure what. I want

>a
>>> bound check box to do something if True and another

>thing
>>> if False. If I had coding as below, what am I

>missing?
>>> Thanks. Wanda
>>> *****************
>>>
>>> Sub Item_CustomPropertyChange(ByVal Name)
>>> Dim chkTest
>>> Set chkTest = Item.GetInspector.ModifiedFormPages
>>> ("P.2").chkTest
>>>
>>> Select Case Name
>>> Case "chkTest"
>>> Set chkTest = Item.GetInspector.ModifiedFormPages
>>> ("P.2").chkTest
>>> If chkTest.Value = True Then
>>> msgbox "Hi there"
>>> End If
>>> End Select
>>> End Sub
>>>

>>.
>>

>.
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off