Solved

Option boxes, sending info to text box.

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 71
VBA error replacing data 6 41
MsgBox 4 71
adding "ungroup sheets" to existing vbs code 5 52
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

740 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