Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / September 2007

Tip: Looking for answers? Try searching our database.

Reading Option Button (VBA) output

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tom Conrad - 12 Sep 2007 15:06 GMT
Powerpoint 2003

I want to use a group of Option Button Controls (3) on a slide, but I can't
figure out how to read the output of the Option Button Grouping.

Signature

Tom Conrad

David M. Marcovitz - 12 Sep 2007 16:59 GMT
=?Utf-8?B?VG9tIENvbnJhZA==?= <TomConrad@discussions.microsoft.com> wrote
in news:F2C91D8C-A5A3-44FC-847A-530544EE4193@microsoft.com:

> Powerpoint 2003
>
> I want to use a group of Option Button Controls (3) on a slide, but I
> can't figure out how to read the output of the Option Button Grouping.

If you put three option buttons on slide 1 named OptionButton1,
OptionButton2, and OptionButton3, then this code will tell you which one
is selected:

Public Sub whichbutton()
   If Slide1.OptionButton1.Value = -1 Then
       MsgBox "It's the first one"
   ElseIf Slide1.OptionButton2.Value = -1 Then
       MsgBox "It's the second one"
   ElseIf Slide1.OptionButton3.Value = -1 Then
       MsgBox "It's the third one."
   End If
End Sub

Signature

David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

Tom Conrad - 12 Sep 2007 17:46 GMT
Thanks it worked great.

Signature

Tom Conrad

> =?Utf-8?B?VG9tIENvbnJhZA==?= <TomConrad@discussions.microsoft.com> wrote
> in news:F2C91D8C-A5A3-44FC-847A-530544EE4193@microsoft.com:
[quoted text clipped - 17 lines]
>     End If
> End Sub
Brian Reilly, MVP - 12 Sep 2007 22:42 GMT
Tom,
Alternatively to David's fine suggestion, you might consider adding
code to the Click Event, not sure of your specific needs.

The following two methods would do that. The first is attached to the
Click of an OptionButton.
The second is attached to the Click of the OK button.

Many ways to get the same result.

Brian Reilly, MVP

>Thanks it worked great.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.