A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Radio Control Buttons



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 17th 06, 04:41 PM posted to microsoft.public.outlook.program_vba
BuddyLats
external usenet poster
 
Posts: 2
Default Radio Control Buttons

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  
Old February 17th 06, 05:30 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Radio Control Buttons

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
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 10:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.