Calculator code, pls help

Reply

Join Date: Nov 2006
Posts: 2
Reputation: iceman101 is an unknown quantity at this point 
Solved Threads: 0
iceman101's Avatar
iceman101 iceman101 is offline Offline
Newbie Poster

Calculator code, pls help

 
0
  #1
Nov 22nd, 2006
Hi could some one please help me with code for vb6.
I have started on a calculator for profit but a error "Overflow" keeps coming up here's the code im usin

dim number as integer
number1 = label1.caption
number= val(label2.caption)
label3.caption = number

Pls help!!!!!!!!!!!!!!!
thanks iceman:rolleyes:
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,144
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 530
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Calculator code, pls help

 
0
  #2
Nov 22nd, 2006
integers only support numbers up to about 30,000
you should use a different variable type such as "long"
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 2
Reputation: iceman101 is an unknown quantity at this point 
Solved Threads: 0
iceman101's Avatar
iceman101 iceman101 is offline Offline
Newbie Poster

Re: Calculator code, pls help

 
0
  #3
Nov 22nd, 2006
Thanks Bro, Email me anytime 4 anything!!!!!!!!!


Iceman
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,144
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 530
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Calculator code, pls help

 
0
  #4
Nov 22nd, 2006
ok so im guessing that fixed the problem then

also, please refrain from naming your posts "Help" or "computer wont start" or anything vague as most users will ignore theese - be more specific with your post titles e.g "VB calculator - overflow"
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC