+ Reply to Thread
Results 1 to 8 of 8

Overflow error copying cells?

  1. #1
    Registered User
    Join Date
    08-02-2004
    Posts
    21

    Overflow error copying cells?

    I couldn't find help with a google search, so thought I would try my luck here. I get a runtime overflow error on this line:
    Please Login or Register  to view this content.
    This error occurs when the worksheet I'm copying the range from, has a long integer.

    I don't think I'm using any variables that I can declare as long. Any suggestions?
    Last edited by AussieM8; 11-06-2010 at 06:16 PM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Overflow error copying cells?

    Hello AussieM8,

    I added the code tags for you this time. Please note the rule below regarding their use.

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-02-2004
    Posts
    21

    Re: Overflow error copying cells?

    So sorry Leith.

    Hoping someone can post a solution for me please.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Overflow error copying cells?

    Try:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  5. #5
    Registered User
    Join Date
    08-02-2004
    Posts
    21

    Re: Overflow error copying cells?

    I think you solved it for me ... tested it once and it worked OK. Thanks so much romperstomper.

    Can you explain to me what Value2 is as I've not come across this before. Does this simply replace an integer with long integer?

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Overflow error copying cells?

    No - Value2 treats all numeric data as Doubles. My suspicion would be that the formatting of your cells was making the Value property into something that was too small for the data - date formats can do this.

  7. #7
    Registered User
    Join Date
    08-02-2004
    Posts
    21

    Re: Overflow error copying cells?

    Oh ... thanks for the info. Yes, the data contains a mixture of text, dates and numeric values so this makes sense now.

    Really appreciate your help mate.

  8. #8
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Overflow error copying cells?

    Glad to help.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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