Member Avatar for breezyy

Hey there,
I'm still a newbie to VB and here's my question.
I have say 3 check boxes and each of them is assigned a message. If I click on one of them, it displays its message (say Hello) in a text box. Now if i press on the 2nd check box, it should display another message(say World), along with the 1st one in the same text box(Hello World). And so on with the 3rd check box. And if I uncheck the 2nd one, it should remove its message (leaving only Hello). I was wondering if there was any other way to do this except for the VERY long if/endifs, case statements i will have to write otherwise( I have 10 check boxes in my program!!!:'( )

Thanks

what problem with if end if or case statement

Hey there,
I'm still a newbie to VB and here's my question.
I have say 3 check boxes and each of them is assigned a message. If I click on one of them, it displays its message (say Hello) in a text box. Now if i press on the 2nd check box, it should display another message(say World), along with the 1st one in the same text box(Hello World). And so on with the 3rd check box. And if I uncheck the 2nd one, it should remove its message (leaving only Hello). I was wondering if there was any other way to do this except for the VERY long if/endifs, case statements i will have to write otherwise( I have 10 check boxes in my program!!!:'( )

Thanks

Hi, you have to check all the check box state each time. If u think it is too long, do it in a sub routine and call this subroutine in each Checkbox. Also you can try for Control Array.

Member Avatar for breezyy

what problem with if end if or case statement

problem with this is i have 1023 possiblities mate! ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.