+ Reply to Thread
Results 1 to 8 of 8

Run-time error 6: overflow

  1. #1
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Run-time error 6: overflow

    Hi guys,

    i hope you can help.

    I make use of this simple method for doing some calculations.

    The only problem is that when my variables are zero (0), I get a Run-time error 6: overflow. I think it has to do with dividing 0 with 0, or something like that. Any ideas how I can overcome this?


    Please Login or Register  to view this content.
    Thank you!
    Sharing knowledge, can be likened to taking another person's hand, and pulling them up to a higher level -- onmyway

    If I was helpful, please remember to click on * Add Reputation below

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Run-time error 6: overflow

    Like

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Re: Run-time error 6: overflow

    Hi AB33

    Thanks will test now. Just changed my declarations from Double to Long, but the got error: 11 - division by 0.

    will revert!

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Run-time error 6: overflow

    It is a crime in math to a divide a number by zero

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Re: Run-time error 6: overflow

    I know!

    I have done i like this:

    Please Login or Register  to view this content.
    Is this mathematically correct? I.e., the fact that I decide g = 0 when my divider = 0?

  6. #6
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Re: Run-time error 6: overflow

    I suppose I could also say the following:

    g = "No Calculation"

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Run-time error 6: overflow

    AB33

    That won't work as both the True and False expressions in Iif are evaluated.
    If posting code please use code tags, see here.

  8. #8
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Re: Run-time error 6: overflow

    Hi Norie,

    And my simple solution?

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Run-time error '6': Overflow HELP!
    By Nils88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2013, 06:46 AM
  2. [SOLVED] Run Time Error '6'-OverFlow
    By mjali001 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-03-2012, 01:50 PM
  3. Run time error 6 Overflow?
    By ben5496 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-06-2011, 09:00 PM
  4. Run-time error '6': Overflow
    By magoobee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2006, 12:54 PM
  5. Replies: 1
    Last Post: 07-21-2006, 07:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1