View Single Post
  #8   Report Post  
Posted to microsoft.public.word.tables
[email protected] jgeorgen@finishline.com is offline
external usenet poster
 
Posts: 3
Default Calculating Options Buttons in Word 2000

On Feb 8, 2:39 pm, "Doug Robbins - Word MVP"
wrote:
Greg's off running again and unless I missed it, he did not point you in the
direction of creating a userform.

See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

wrote in message

oups.com...



On Feb 7, 1:29 pm, "Doug Robbins - Word MVP"
wrote:
You can get to the finishline by crawling, walking or running.


Need to learn how to crawl, then walk, before trying to run.


--
Hope this helps.


Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.


Doug Robbins - Word MVP


wrote in message


groups.com...


I am building an evaluation form for work. There are seven
categories. In each category there are five ratings (1-5) and users
select a rating by clicking an option button. I'd like to calculate
the numeric total of all the selected option buttons at the bottom of
the form and I've tried to use the following code to do so:


Dim a, b, c, d, e, f, g As Long
Dim pScore As Long
With ThisDocument
Select Case True 'First group
Case .OptionButton1.Value
a = 5
Case .OptionButton2.Value
a = 4
Case .OptionButton3.Value
a = 3
Case .OptionButton4.Value
a = 2
Case .OptionButton5.Value
a = 1
Case Else
MsgBox "No selection in Group 1"
End Select
'this would be repeated for the other categories.
End With
End Sub


When finally running the code, however, I get the following error
msg... "Compile Error: Method or Data Member not found" and the
program highlights the words "OptionButton1" in the code. Can someone
help me understand what this means and how to fix it? Thanks very
much.- Hide quoted text -


- Show quoted text -


Doug,


I think I'm crawling. Thanks to both you and Greg for your help.
Here's another question. Your code...Do I need to be incorporating a
UserForm to employ the code? If so, how do I make a document that
uses Option Buttons set in a UserForm? Any good MVP articles that I
can study? I am a novice at UserForms.


Thanks so much again,
Josh- Hide quoted text -


- Show quoted text -


Greg,

Thanks so much! I will try that out and let you know how it goes.

Doug,

Thanks for the reading suggestion. That's a great idea, and I
actually did read it before I started this project. Even so, I'll
review it again to make sure I didn't miss anything. My biggest
question was simply getting the nicely arranged UserForm to populate
onto a template. In the reading material, the code for the
commandbutton is given to you, and so when I branch out from that, I'm
lost because I barely know any code.

I'll give both of your suggestions a whirl and report back. Thanks
again for your continued help.

Josh