Greg,
Thank you.
I just had them on the page in the Word doc, though I'm getting the
impression that a UserForm is the way to go. Thing is, lots of people
here are 'old school,' i.e., still convinced they have to feed cheese
to their mouse. Not the most tech-savvy, shall we say, and as far as
they know a "UserForm" is a "Popup" which obviously must have a "Virus"
and they freak out and call the Help Desk.
I've been reading through and I see other lines of thought with using
check boxes scripted to make one box per group exclusive:
Dim oField As FormField
For Each oField In Selection.Frames(1).Range.FormFields
oField.CheckBox.Value = False
Next oField
Selection.FormFields(1).CheckBox.Value = True
End Sub
(From the word.mvps.org site.)
This seems pretty low-maintenance, but I run up against the same
problem, I'm newbi-gnorant about VBA and have no idea how to A) get the
value for the checked box per group; then B) get it into the
calculations.
I think B will be easy, if I can get help with A......
Cheers,
Chris
Greg - 22 Mar 2006 21:57 GMT
Chris,
A problem with that method is when users mouse click around the form
rather than using tab.
Each frame containing the buttons will have an index number, you might
use something like:
Sub Test()
Dim oField As FormField
For Each oField In Selection.Frames(1).Range.FormFields
oField.CheckBox.Value = False
Next oField
Selection.FormFields(1).CheckBox.Value = True
Frame1Value
End Sub
Sub Frame1Value()
Dim Val As Double
Select Case True
Case Is =
ActiveDocument.Frames(1).Range.FormFields("Check1").CheckBox.Value
Val = 0.5
Case Is =
ActiveDocument.Frames(1).Range.FormFields("Check2").CheckBox.Value
Val = 1
Case Else
End Select
MsgBox Val
End Sub