Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Visual Basic
Name: jackets380 Date: May 18, 2004 at 09:06:59 Pacific OS: 98se CPU/Ram: 1.8 512
Comment:
I am trying to make a project. In this project i have several text boxes. What I want my program to do is to add up all of the numbers from the text box and if the number is higher than 30 I want it to say "HI" and if it is less than 30 i want it to say "BYE" and if it is 30 i want to say "HELLO". I have declared the variables and boolean, i know how to use the val function. Now I need to figure out how it will only say HI, instead of saying BYE, then HI. Any help - give me a shout
Name: Martyn999 Date: May 18, 2004 at 09:28:29 Pacific
Reply:
simplest way is to make your text boxes ina control array. name the array something like "txtnums", then use this code to loop through and add all the values up.
Dim Count As Integer For Count = LBound(txtnums) To UBound(txtnums) Number = Number + txtnums(Count).Text Next Count
If Number > 30 Then MsgBox "HI" If Number < 30 Then MsgBox "BYE If Number = 30 Then MsgBox "HELLO"
you can change the msgboxes to whatever you want, maybe displayed in a label. also change the variable names if you want.
0
Response Number 2
Name: jackets380 Date: May 18, 2004 at 14:13:02 Pacific
Reply:
HOLY CRAP THANKS ~ it's been a while since i've used VB. Thanks so much
Summary: I'm in school and homework is to install Visual Basic.Net and Visual Studio.Net. I'm having a problem installing it. It says I'm missing files and its not compatible. My OS is XP. Help where do I star...
Summary: i had a visual basic written program in EXE format sent by my friend. But i cannot view it because i did not install any VB program. Do anyone know where to download necessary files to view VB files? ...
Summary: Hi there, I really need help because my uncle recently bought me Visual Basic .Net 2003 from Italy and unfortunately I don't know Italian. So I was wondering if there is a patch or something that can ...