Solved

Looping a byte from 0 To 255 gives Owerflow error

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

688 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