![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I have a form that has radio control buttons in three groups. I have
writtent the following script to keep the button groups separate. When I run it I keep getting a message that says: Expected end of statement Line no. 2. I am new to this. Any help would be appreciated. Here is the script. Sub Item_Open(Brokerage21305) set OptionButton1 = Item.Gender Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton1") set OptionButton2 = Item.Gender Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton2") set OptionButton3 = Item.Gender Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton3") set OptionButton4 = Item.Unit of Sale.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton4") set OptionButton5 = Item.Unit of Sale.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton5") set OptionButton6 = Item.Unit of Sale.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton6" set OptionButton7 = Item.Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton7") set OptionButton8 = Item.Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton8") set OptionButton9 = Item.Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton9") OptionButton1.Caption = "Female" OptionButton2.Caption = "Male" OptionButton3.Caption = "Both" OptionButton1.GroupName = "Gender Audience" OptionButton2.GroupName = "Gender Audience" OptionButton3.GroupName = "Gender Audience" OptionButton4.Caption = "Hi Ticket" OptionButton5.Caption = "Low Ticket" OptionButton6.Caption = "Mid Range" OptionButton4.GroupName = "Unit of Sale" OptionButton5.GroupName = "Unit of Sale" OptionButton6.GroupName = "Unit of Sale" OptionButton7.Caption = "Consumer" OptionButton8.Caption = "Business" OptionButton9.Caption = "Both" OptionButton7.GroupName = "Audience" OptionButton8.GroupName = "Audience" OptionButton9.GroupName = "Audience" End Sub -- Frank N. Latella |
#2
|
|||
|
|||
![]()
This is a custom Outlook form? (You posted in the VBA group, not the forms group.) Looks like you're not using the right syntax to refer to a control on the form. see http://www.outlookcode.com/d/propsyntax.htm#unbound
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "BuddyLats" wrote in message ... I have a form that has radio control buttons in three groups. I have writtent the following script to keep the button groups separate. When I run it I keep getting a message that says: Expected end of statement Line no. 2. I am new to this. Any help would be appreciated. Here is the script. Sub Item_Open(Brokerage21305) set OptionButton1 = Item.Gender Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton1") set OptionButton2 = Item.Gender Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton2") set OptionButton3 = Item.Gender Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton3") set OptionButton4 = Item.Unit of Sale.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton4") set OptionButton5 = Item.Unit of Sale.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton5") set OptionButton6 = Item.Unit of Sale.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton6" set OptionButton7 = Item.Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton7") set OptionButton8 = Item.Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton8") set OptionButton9 = Item.Audience.New/Rev. Client/Prospect Company("P.2").Controls("OptionButton9") OptionButton1.Caption = "Female" OptionButton2.Caption = "Male" OptionButton3.Caption = "Both" OptionButton1.GroupName = "Gender Audience" OptionButton2.GroupName = "Gender Audience" OptionButton3.GroupName = "Gender Audience" OptionButton4.Caption = "Hi Ticket" OptionButton5.Caption = "Low Ticket" OptionButton6.Caption = "Mid Range" OptionButton4.GroupName = "Unit of Sale" OptionButton5.GroupName = "Unit of Sale" OptionButton6.GroupName = "Unit of Sale" OptionButton7.Caption = "Consumer" OptionButton8.Caption = "Business" OptionButton9.Caption = "Both" OptionButton7.GroupName = "Audience" OptionButton8.GroupName = "Audience" OptionButton9.GroupName = "Audience" End Sub -- Frank N. Latella |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using Tab Control in Addin | Sanjay Singh | Add-ins for Outlook | 2 | March 9th 06 03:19 AM |
Enebling of the buttons | Radiohead | Add-ins for Outlook | 0 | February 15th 06 04:28 PM |
Some Toolbar Buttons missing in OE 6.0 | ajhale | Outlook Express | 1 | February 4th 06 04:49 PM |
Toolbar Buttons Disppear | Donniebb | Outlook Express | 1 | January 30th 06 08:48 PM |
How to Program a Calendar Control | Chaplain Doug | Outlook - Using Forms | 1 | January 12th 06 02:53 PM |