Using Option Buttons to change a value in a Word 2016 table

I am attempting to create a form that uses option buttons to assign a score, which would later be totaled for evaluation purposes.

Here is a pic of a portion of the proposed form, with 5 columns:

Here is a picture of the code I have attempted to use, which worked just exactly as I wanted it to "in EXCEL." Due to needs in other parts of the form, however we will be using Word, not Excel.

Since we've decided to use Word, due to other features that Excel lacks, what code should I be using that would place a point value in the "Points" column? (assuming e2 to be the address of the 2nd row, 5th column?). Any help would be a blessing! Thanks!

[Move from Word/ Mac / Office 2019]

Easily done with Office on WIndows, but I am not sure about on a Mac.  I suggest that you include Mac in the title of your thread so that it attracts some of the Mac responders.
Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I am not using a Mac, I am using Windows 10. Did I post in the wrong forum?

So, if it's easy to do on Windows, what should come after "Then" in my If -Then code?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I though I was going crazy, but now I see that some has added "[Move from Word/ Mac / Office 2019]" at the bottom of your original post.

In place of 

Range("e2").Value =

Use

Selection.Rows(1).Cells(5).Range.Text =

as shown below

Private Sub opt1_Click()

If opt1.Value = True Then Selection.Rows(1).Cells(5).Range.Text = 1

End Sub

Private Sub opt2_Click()

If opt2.Value = True Then Selection.Rows(1).Cells(5).Range.Text = 2

End Sub

Private Sub opt3_Click()

If opt3.Value = True Then Selection.Rows(1).Cells(5).Range.Text = 3

End Sub

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 165 Applies to: