Results 1 to 2 of 2

Thread: runtime error 6

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Posts
    297

    runtime error 6

    what is this error

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    It happens when you try to assign a value to a variablewhich is outside its range.
    From MSDN:

    An overflow results when you try to make an assignment that exceeds the limitations of the target of the assignment. This error has the following causes and solutions:

    The result of an assignment, calculation, or data type conversion is too large to be represented within the range of values allowed for that type of variable.
    Assign the value to a variable of a type that can hold a larger range of values.

    An assignment to a property exceeds the maximum value the property can accept.
    Make sure your assignment fits the range for the property to which it is made.

    You attempt to use a number in a calculation, and that number is coerced into an integer, but the result is larger than an integer. For example:
    Dim x As Long
    x = 2000 * 365 ' Error: Overflow
    To work around this situation, type the number, like this:

    Dim x As Long
    x = CLng(2000) * 365

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width