Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,551 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,898 people online right now. Registration is fast and FREE... Join Now!




Dreaded Run time error six "overflow"

 
Reply to this topicStart new topic

Dreaded Run time error six "overflow", It haunts me....

Onibeaver
23 Aug, 2008 - 10:16 AM
Post #1

New D.I.C Head
*

Joined: 23 Aug, 2008
Posts: 8

In my mind it should have gone like this, text Box takes in integers puts them into variable called "info" and a counter would run a array to take in those numbers, Later the array would run in reverse by way of another counter and spit them out,

I can put in six integers into my text box before I get hit with run time error six, the bane of my life. Debug says it starts here

vb

Option Explicit
Dim info As Double
Dim counter As Integer |
Dim DownCounter As Integer | but I cant see whats
Dim TenNum(9) As Integer | going
| WRONG!!!
Private Sub Command1_Click() |
MsgBox "type in ten Numbers" |
End Sub |
|
Private Sub InputBox_Change() <---------------
info = InputBox
counter = 0
While counter < 10
TenNum(counter) = info
counter = counter + 1
Wend
End Sub
Private Sub PartOne_Click()
DownCounter = 10
While DownCounter > 0
OutputBox.Print TenNum(DownCounter)
DownCounter = DownCounter - 1
Wend
End Sub

User is offlineProfile CardPM
+Quote Post

Zhalix
RE: Dreaded Run Time Error Six "overflow"
23 Aug, 2008 - 10:23 AM
Post #2

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
Overflow means you're going out of the bounds for that datatype. Trying making it a Double.
User is offlineProfile CardPM
+Quote Post

Onibeaver
RE: Dreaded Run Time Error Six "overflow"
23 Aug, 2008 - 02:23 PM
Post #3

New D.I.C Head
*

Joined: 23 Aug, 2008
Posts: 8

QUOTE(Zhalix @ 23 Aug, 2008 - 11:23 AM) *

Overflow means you're going out of the bounds for that datatype. Trying making it a Double.



cool! ty Zhalix, gonna switch it to double and see where things go from there,

Also is there a limit to how many digits the textbox can hold and is there anywaY to change it?
User is offlineProfile CardPM
+Quote Post

Zhalix
RE: Dreaded Run Time Error Six "overflow"
23 Aug, 2008 - 02:42 PM
Post #4

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
I believe the limit of a textbox is 65535 individual characters. Though you can place an artificial limit by setting the MaxLength property.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 11:12PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month