Solved

Option boxes, sending info to text box.

Posted on 1998-11-18
3
159 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
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 50 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now