Results 1 to 5 of 5

Thread: Error running regression Macro
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Aug 2019
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Error running regression Macro

    Hello,

    I have been working on automating a spreadsheet that contains a Regression Analysis. I have ran through it numerous times and it works just fine. However, when I send it to a coworker she gets an error saying "Run time error. Cannot run macro." She has macros enabled, but for whatever reason, it will not run. Any thoughts?? Thanks!

    (This is where the error occurs)

    Application.Run "ATPVBAEN.XLAM!Regress", Sheets("Data").Range("M5:M" & x1), _
    Sheets("Data").Range("O5:S" & y1), False, False, , "", False, False, _
    False, False, , False

  2. #2
    New Member
    Join Date
    Aug 2019
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Error running regression Macro

    The exact error she is receiving is:

    Run-time error '1004':

    Cannot run the macro ". The macro may not be available in this workbook or all macros may be disabled.

  3. #3
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,806
    Post Thanks / Like
    Mentioned
    57 Post(s)
    Tagged
    11 Thread(s)

    Default Re: Error running regression Macro

    It looks like it is referencing an Add In (that is what the "xlam" file extension suggests, see: https://www.lifewire.com/xlam-file-2622521).

    Do they have access to this Add In on their computer, and has the Add In been enabled for them?
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  4. #4
    New Member
    Join Date
    Aug 2019
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Error running regression Macro

    Yes, she has the Add In enabled. That was the first thing we checked. We ended up figuring it out.

    As for the question I posted this morning that you locked, it was a completely different question. You can see (if you read closely) that she is not receiving an error at all. The macro does not execute fully and seems to stall without any error.

  5. #5
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,806
    Post Thanks / Like
    Mentioned
    57 Post(s)
    Tagged
    11 Thread(s)

    Default Re: Error running regression Macro

    Yes, she has the Add In enabled. That was the first thing we checked. We ended up figuring it out.
    OK. We just ask that when that happens, you post back to the original thread, letting people know it has been solved, so that no one wastes time trying to solve it.
    If you post how it was solved, that is helpful if people have the same issue and come across this thread.

    As for the question I posted this morning that you locked, it was a completely different question. You can see (if you read closely) that she is not receiving an error at all. The macro does not execute fully and seems to stall without any error.
    OK. Sorry about that. It look similar upon first glance.

    I will remove the response and open it back up for you.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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