+ Reply to Thread
Results 1 to 6 of 6

Run Time Error '6'

  1. #1
    Registered User
    Join Date
    02-17-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    86

    Run Time Error '6'

    In my project, when i am trying to changing the values first time using drop down list its showing error " Run time Error '6' over flow

    coding of the project is


    Dim nota As Long, free As Long, total As Long

    nota = Application.WorksheetFunction.CountIf(Range("E9:E23"), "N/A")
    free = Application.WorksheetFunction.CountBlank(Range("E9:E23"))
    total = nota + free


    Range("i24").Value = (((WorksheetFunction.Sum(Range("f9:f23"))) / ((Range("a23").Value) - (total)))) / CLng(100)



    file attached
    Attached Files Attached Files

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

    Re: Run Time Error '6'

    It is pass word protect code. Overflow error could mean you are trying to divide a number by zero.

  3. #3
    Registered User
    Join Date
    02-17-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    86

    Re: Run Time Error '6'

    sorry , i will attach new excel sheet
    Attached Files Attached Files

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

    Re: Run Time Error '6'

    The mathematical operation is wrong
    Please Login or Register  to view this content.
    My suggestion is to break-down the code in to each part, like
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-17-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    86

    Re: Run Time Error '6'

    Done a great job for me to make my work easy

  6. #6
    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'

    This is the actual code from the workbook, and totalrange is 0, which means you are dividing by zero later on and that's why you get the overflow error.

    Please Login or Register  to view this content.
    Try adding a check for totalrange.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

+ 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. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  2. Cannot Publish Excel Pivot Chart - Run Time Error
    By crisb184 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2013, 07:04 AM
  3. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  4. run-time error ;2147023179 (800706b5) time automation error interface unknown
    By karthik72 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2012, 09:31 AM
  5. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 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