+ Reply to Thread
Results 1 to 4 of 4

Issue in macro getting overflow error

  1. #1
    Registered User
    Join Date
    02-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    11

    Issue in macro getting overflow error

    Hi Team,
    I wrote a macro to populate values based on static and seconds.
    But when i am populating the values to sheet from macro i am getting overflow error.
    Some time the code is working for 100 records sometimes 200.No sure what is the problem.
    Can any one from the team help me to proceed further.I want the code to work for any value of nearer to 10000.

    Please Login or Register  to view this content.
    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Issue in macro getting overflow error

    declare your Integer variables as Long instead

    by the way this line
    Please Login or Register  to view this content.
    declares all the variables except countSecond as Variant and not Integer
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    02-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Issue in macro getting overflow error

    Hi Joseph,
    Thanks a lot.It's working as expected.U Rock's.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Issue in macro getting overflow error

    you're welcome :-)

    please don't forget to mark the thread solved (click the 'thread tools' link at the top, then 'mark solved')

+ 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 - Macro That Find Text and Copy Range & Replace on Other Sheet
    By asgharhussaini in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2013, 04:34 AM
  2. Explanation of the Run-time error '6': Overflow Error
    By mgphill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2012, 10:46 AM
  3. Overflow Error - Faster way of copying through macro
    By c.vaibhav in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-02-2009, 06:45 PM
  4. runtime error 6 overflow when running a macro
    By Kim in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2006, 12:45 PM
  5. [SOLVED] overflow error 6.. the macro just stops any idea why?
    By ste mac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2005, 12:06 PM

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