|
-
Feb 25th, 2006, 04:26 PM
#1
Thread Starter
Lively Member
[RESOLVED] Can't divide by 0
I have a program where it divides two numbers from text boxes. Whenever I have both the numbers at 0 I get "Run time 6 Overflow". Thats aboviously because you can't divide by 0. However I'm trying to make it so when you try to divide by 0 then nothing happens instead of just closing the program. I've tried
If text1.text = 0 and text2.text = 0 then text3.text = 0 else: text3.text = val(text1.text) / val(text2.text)
But I still come up with the error, and when I try to debug it highlights the else statement. Any know what to do?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|