PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Re: Check Boxes
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Re: Check Boxes
![]() |
Re: Check Boxes |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 > |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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 >>> >>. >> >. > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

