iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
IT Discussion Forum Having IT issues? Got IT questions? Who doesn't? If you can't get your Apache to work with your MySQL or your php is choking on your ODBC... Let's see if we can help you come up with some ideas.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-09-2005, 09:41 AM
WebProWorld New Member
 
Join Date: Nov 2005
Posts: 1
relpats RepRank 0
Default VB Help needed

Hello,
I am taking a class and haven't done any programming before. I am trying to edit a calculation program to allow a user to continue in the program when a "system.overflow.exception" occurs without changing my variable type. I have tried using a try/catch and if > neither are working.

The code I am using is as follow:

'Determine checked button and calculate
If RadioButton1.Checked And FirstNum + SecondNum > 32500 = True Then
MsgBox("Number to large and resulted in overflow. Please enter a smaller number.")
Else
TextBox3.Text = FirstNum + SecondNum
End If

If RadioButton2.Checked = True Then
TextBox3.Text = FirstNum - SecondNum
End If
If RadioButton3.Checked = True Then
TextBox3.Text = FirstNum * SecondNum
End If
If RadioButton4.Checked And SecondNum = 0 Or FirstNum = 0 = True Then
MsgBox("You can't divide by zero! Please enter another number")
Else
TextBox3.Text = FirstNum / SecondNum
End If

I would appreciate any help I can get.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 03:13 PM.



Search Engine Optimization by vBSEO 3.3.0