+ Reply to Thread
Results 1 to 7 of 7

Macro stops in an odd place

  1. #1
    Registered User
    Join Date
    11-15-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2021
    Posts
    50

    Macro stops in an odd place

    I have a macro in a spreadsheet I took over from a colleague that stops in a 'weird' place - and I can't figure out why. Hope someone here can help

    Please Login or Register  to view this content.
    The macro stops in the second line.

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Macro stops in an odd place

    You're copying two different cells (A6,AO2000) and trying to paste into one (A6). Are you trying to paste the full range? If so, that would be Range("A6:AO2000")

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

    Re: Macro stops in an odd place

    @jomili,
    Range("A6", "AO2000") refers to the range from A6 to AO2000 and not to just those two cells-that would be Range("A6,AO2000")

    @DKAbi,
    what error occurs?
    Josie

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

  4. #4
    Registered User
    Join Date
    11-15-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2021
    Posts
    50

    Re: Macro stops in an odd place

    Thanks. I just corrected the macro, but still after the change I get a debug error.
    Please Login or Register  to view this content.
    I'm located in Denmark, so I think there's a difference of where to use ; and ,? I want to copy paste the entire range.

  5. #5
    Registered User
    Join Date
    11-15-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2021
    Posts
    50

    Re: Macro stops in an odd place

    I tried to re-record my macro manually, but got a strange error message when I tried to copy paste as values into the same range. I have attached the error message and wonder if anyone can tell me how to correct for future runs...
    Attached Images Attached Images

  6. #6
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Macro stops in an odd place

    as far as i understood you want to make values from formula results in those cells, how about:
    Please Login or Register  to view this content.
    Regards
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  7. #7
    Registered User
    Join Date
    11-15-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2021
    Posts
    50

    Re: Macro stops in an odd place

    Wow, tehneXus. That did the trick. Many thanks for your quick reply and help!!

+ 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