Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Option boxes, sending info to text box.

Posted on 1998-11-18
3
Medium Priority
?
175 Views
Last Modified: 2010-05-03
Ok, I have a array Option set...And what I need is to make a scorer. When I click one option box, it makes Text in a seperate Textbox, add 1 point to a score (That starts at  Zero). How could I do that?
0
Comment
Question by:Klueny2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:mithomas
ID: 1445544
Do all option buttons increment the score by one, or do they increment by different values?  Give us some more detail, and you'll get a good answer.

:-)
0
 

Author Comment

by:Klueny2
ID: 1445545
Ok...I'll try to make it clearer this time. I have 1 Option Array...with 5 option clicks, and 5 text boxes that go with it. I will Have 3 Command buttons one that adds 1 point to score, one that adds 2 points, and one that adds 3. Now, what I want to do is when I hit a certain option click...then hit the command button of 1,2, or 3 points...that points will be added to the matching text box with the options...If thats  unclear, please ask some more details.
0
 
LVL 2

Accepted Solution

by:
schild earned 100 total points
ID: 1445546
that was very clear

and here is your program:


Private Sub Command1_Click(Index As Integer)

    Dim OptIndex As Integer
    For OptIndex = 0 To 4
        If Option1(OptIndex).Value = True Then
           Text1(OptIndex).Text = CStr(CInt(Text1(OptIndex).Text) + Index + 1)
           Exit For
        End If
    Next
   
End Sub

Private Sub Form_Load()

    Dim Index As Integer
   
    For Index = 0 To 4
        Text1(Index).Text = "0"
    Next
   
End Sub

Please be ware that the Command buttons are array as well, the first button add 1 point the second two and the therd add three point

Good Luck
Schild
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question