rOSSybOY Posted December 11, 2005 Posted December 11, 2005 i have 4 check boxes, a calculate button, and a label. when u check the box or boxes u want, u click the calc button, and it will at those prices to the base cost, and then it will show your total cost in a label. when i check mulitple boxes, it adds the lowest box's value -- example Shoes $20 Hat $15 Shirt $14 say i click hat and shirt, it will only add the $14 that the shirt costs to the total cost.. i have tried many things but none seem to fix the problem :confused: Quote
techmanbd Posted December 11, 2005 Posted December 11, 2005 show the code, You can get better help that way Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
*Experts* DiverDan Posted December 11, 2005 *Experts* Posted December 11, 2005 This is too simple....Techmanbd's right though, you should show some attempt to solving your problem. But this one is too simple. In your Add button sub: If ckShirt.Checked Then 'add shirt cost ElseIf ckHat.Checked Then 'add hat cost ElseIf ckShoes.Checked Then 'add shoes cost End If Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
rOSSybOY Posted December 11, 2005 Author Posted December 11, 2005 i think i have found the solution already, it was just a simple thing i was doing wrong, that i didnt see, but anyways, thanx for the input Quote
Leaders snarfblam Posted December 12, 2005 Leaders Posted December 12, 2005 In your Add button sub: If ckShirt.Checked Then 'add shirt cost ElseIf ckHat.Checked Then 'add hat cost ElseIf ckShoes.Checked Then 'add shoes cost End If Don't wanna do that! That will add one and only one of the prices into the total (ElseIf chains will execute no more than one block of code: that for the first true condition it finds). If ckShirt.Checked Then _ 'add shirt cost If ckHat.Checked Then _ 'add hat cost If ckShoes.Checked Then _ 'add shoes cost Quote [sIGPIC]e[/sIGPIC]
*Experts* DiverDan Posted December 12, 2005 *Experts* Posted December 12, 2005 (edited) Marble eater, you'd be better off re-reading the original post a couple of more times than posting ridiculous comments that are just plain wrong...again. and then it will show your total cost in a label. when i check mulitple boxes, it adds the lowest box's value Edited December 12, 2005 by DiverDan Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Leaders snarfblam Posted December 12, 2005 Leaders Posted December 12, 2005 My apologies. Excuse my plain wrongness, but I was under the ridiculous impression that (and still am not sure that I was wrong)... and then it will show your total cost in a label. when i check mulitple boxes, it adds the lowest box's value[/Quote] was a description of what was going wrong, as opposed to a desired result. Well, if I was wrong, my apologies again (again?) for my complete and utter ridiculousness. In the future I hope to not displease you with my imperfections (or perceived imperfections, whichever is applicable) and plain wrongness (or so perceived wrongness, again (again?), whichever is applicable). I appreciate the friendly manner in which you pointed out my alleged mistake. It's great to see you sharing constructive criticism, which demonstrates your good attitude and desire to improve and aid in the world of programming. The fact that you so strongly embrace the idea of the online community and the warm friendliness associated with community, shows a glimmer of hope in this dark, sad, lonely world. I hope that together we can eliminate ridiculousness and plain wrongness from everything .Net so that some day the world can again be a happy place with kittens and rainbows! (What do you mean, again?) In all seriousness, If I misunderstood you, rOSSybOY, I apologize. I hope I didn't provide you with any misinformation. Quote [sIGPIC]e[/sIGPIC]
Cags Posted December 13, 2005 Posted December 13, 2005 I would concur with marble_eater on this one, I thought that was part of the problem that rossyboy was trying to fix. I guess that rossyboy is the only one that knows either way for certain. But either way comments like... Marble eater, you'd be better off re-reading the original post a couple of more times than posting ridiculous comments that are just plain wrong...again. aren't really necessary. As for marble_eaters reply I think you may have overloaded my sarcasm parser with that one. ;) Quote Anybody looking for a graduate programmer (Midlands, England)?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.