Solved

Looping a byte from 0 To 255 gives Owerflow error

Posted on 2004-04-09
2
147 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 200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 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