The information in this article applies to:
SYMPTOMSWhen you group a series of ActiveX option buttons on a Microsoft Word document by setting the group name for each ActiveX option button to the same name, changing the value of one ActiveX option button within the group to TRUE does not toggle the values of the other ActiveX option buttons within the same group to FALSE. CAUSEBy Design, ActiveX option buttons, when inserted from the Control Toolbox, are inserted as floating objects. Option buttons inserted as floating objects are not mutually exclusive, even when their GroupName property is identical. WORKAROUNDTo work around this problem, use one of the following methods. Method 1: Convert the ActiveX Option Buttons to Inline ObjectsConverting the ActiveX option buttons to inline objects will allow you to toggle the values of grouped option buttons.To convert the ActiveX option buttons to inline objects:
For additional information about using Frames, please see the following article in the Microsoft Knowledge Base: Q159942 WD97: General Information about Text Boxes and Frames in Word 97 Method 2: Use the Following Macro Examples to Toggle the ValuesMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Solution Provider or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Solution Providers, please see the following page on the World Wide Web: http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspThe following sample Visual Basic for Applications macro will allow you to keep the option button float over text status and toggle the values based on groupings. Before running the macro examples, group the option buttons as detailed in the steps "To group the option buttons" described earlier in this article. Place the following procedure in the General Declarations section of the Normal project.
For each option button in your group, place the following example code that calls the SetOptionGroupValues sub-routine within each option button's GotFocus event procedure.
The argument, <OptionButtonName> must match the name of the option button.
For example,
To view the GotFocus event procedure for an option button:
Additional query words: wordcon word97 word8 8.0 vb vbe vba
Keywords : kbcode kbmacro kbprg kbtool kbmacroexample |
Last Reviewed: November 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |