?
Solved

Looping a byte from 0 To 255 gives Owerflow error

Posted on 2004-04-09
2
Medium Priority
?
149 Views
Last Modified: 2010-05-02
Hi!

    Dim x As Byte
    For x = 0 To 255
        Debug.Print x
    Next x

Why does this raise an error?
0
Comment
Question by:dbrckovi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Expert Comment

by:Sys_Prog
ID: 10789623
I am not aware much of VB
But BYTE would be able to store 1 byte of data
i.e.
the range of values would be

-128 to 127

Thus, u have exceeded the limit

Amit
0
 
LVL 17

Accepted Solution

by:
zzzzzooc earned 800 total points
ID: 10789633
Answered it in your other question when you mentioned it.. :)

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20947594.html
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question