View Single Post
  #5   Report Post  
Posted to microsoft.public.word.tables
Greg Maxey
 
Posts: n/a
Default Setting a value to a option button & then calculating the total

Yes sorry.

Change the declaration of a, b, c, etc. and pScore to Double vice Long


wrote:
Greg:

Also, I put your code in as shown below, but it doesn't seem to be
calculating the total correctly. If "Ineffective" is = 1 and "Capable"
is equal to 2 then the total would be 3 / 2 which would be 1.5 and I
think it is rounding up. I don't want it to do that.

Thanks, again!
wrote:
I am using MS Word 2003 to create a Word document form.

I'm using tables to insert my form fields.

In one table I have option buttons where the user must select one of
the option buttons in that group. For example:

My first Option button group would be named "Adaptability". Within the
"Adaptability" Option button Group I have 4 option buttons:
Ineffective, Capable, Superior and N/A.

I have 10 Groups with each group having 4 options, Ineffective,
Capable, Superior and N/A.

Ineffective should have a checked value of 1, Capable should have a
checked value of 2, Superior should have a checked value of 3 and N/A
should have a checked value of -1.

I want to write something in code to check the value of each groups
option buttons and then present a total that will be divided by 10.

I hope I've given you the info you need to help me out, but if not,
please let me know and I'll try to explain further. Sometimes it is
difficult to convey what you want in writing.

I'm pretty much of a novice at this so can anyone help me out? I think
that I need some kind of CASE statement, but not sure. Thanks very
much in advance.