Ask Experts Questions for FREE Help !
Ask
    lamlamlamiaaa's Avatar
    lamlamlamiaaa Posts: 28, Reputation: 2
    New Member
     
    #1

    Nov 30, 2010, 06:20 PM
    Visual Basic Help
    Okai I need help in my visual basic assignment. So,
    There are 5 checkboxes and what I want is that, when I click on a checkbox I want it to be listed automatically in a label or something, in any order. Get it?? PLEASE HELP Thank you!
    GaryStaunton's Avatar
    GaryStaunton Posts: 17, Reputation: 2
    New Member
     
    #2

    Nov 30, 2010, 10:52 PM
    Look up how to use the Checkbox in the help file. You can use the Click event, for example:

    Private Sub Check1_Click()

    Dim TextToDisplay As String

    If Check1.Value = 1 Then TextToDisplay = "Check 1" Else TextToDisplay = ""

    Label1.Caption = TextToDisplay

    End Sub

    Hope that guides you.
    GaryStaunton's Avatar
    GaryStaunton Posts: 17, Reputation: 2
    New Member
     
    #3

    Nov 30, 2010, 10:54 PM
    Look up how to use the Checkbox in the help file. You can use the Click event, for example:

    Private Sub Check1_Click()

    Dim TextToDisplay As String

    If Check1.Value = 1 Then TextToDisplay = "Check 1" Else TextToDisplay = ""

    Label1.Caption = TextToDisplay

    End Sub

    Hope that guides you.
    lamlamlamiaaa's Avatar
    lamlamlamiaaa Posts: 28, Reputation: 2
    New Member
     
    #4

    Dec 1, 2010, 02:24 PM
    It doesn't work.
    What I want it to do is that, when a checkbox1,2,3,4... is checked then I want labels to show what I have checked it, in the order that I checked it.
    Please suggest a different one.
    GaryStaunton's Avatar
    GaryStaunton Posts: 17, Reputation: 2
    New Member
     
    #5

    Dec 8, 2010, 10:29 PM
    Would be nice to see an example of the output.

    Try this:

    Label1.Caption = Label1.Caption & TextToDisplay & " "

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Visual basic [ 1 Answers ]

I already finish a very simple calculator,actually it has only four buttons. at first its working fine but when add another feature its not working anymore. What I want to do is when press 1 then press + then press 1 and press + again it should add the first two number get ready to add another...

Visual basic [ 1 Answers ]

I want to to create a calculator in visual basic. How can I do this.there only that key preasent what I know that is (0-9, +, -, *, /,. = cleare)this code are preasent. So tell me the code which code I use to create this buttons.

Visual Basic [ 1 Answers ]

Actually I'm a new user(student) of Visual Basic.So I want to know how I am make a simple calculator in Visual Basic 6?

Hello visual basic [ 3 Answers ]

I really need help passing a course in school that has to do with the book An introduction to programming using Microsoft visual basic.net


View more questions Search