+ Reply to Thread
Results 1 to 5 of 5

Run-time Error on Mac - -2147221020 (800401e4)

  1. #1
    Forum Contributor
    Join Date
    08-12-2019
    Location
    NYC
    MS-Off Ver
    2019
    Posts
    155

    Run-time Error on Mac - -2147221020 (800401e4)

    Hi,

    I have an excel file that works fine on Windows (I use Windows 10) but not on Mac. After opening the file on mac and clicking on "Enable Macros", I obtain the following error message:

    Microsoft Visual Basic
    Run-time error '-2147221020 (800401e4)' :
    Automation error


    I understand this probably comes from the VBA included in my spreadsheet but how can I identify precisely the piece of code that is not working on Mac? (I have limited VBA code in my spreadsheet overall)

    Thank you

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Run-time Error on Mac - -2147221020 (800401e4)

    I know that on windows you can step through the code using the F8 key. There should be an equivalent on Mac. See the VBA Editor menus

  3. #3
    Forum Contributor
    Join Date
    08-12-2019
    Location
    NYC
    MS-Off Ver
    2019
    Posts
    155

    Re: Run-time Error on Mac - -2147221020 (800401e4)

    Thank you Pepe. I've managed to identify the VBA function that creates the issue. To resolve the issue, I tried to add the code between an "If Mac then ... Else...." condition but it still generates the error message on mac. Am I missing something here? I thought that by using this If format, excel would not run the macro on mac computers and the error message would disappear. Doesn't it work like that?

    Thanks

  4. #4
    Forum Contributor
    Join Date
    08-12-2019
    Location
    NYC
    MS-Off Ver
    2019
    Posts
    155

    Re: Run-time Error on Mac - -2147221020 (800401e4)

    My bad, I found my mistake, I didn't realize the If Mac needed to start with #

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Run-time Error on Mac - -2147221020 (800401e4)

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. [SOLVED] Error message: Run-Time error '1004 '; application-defined or object-defined error
    By Davasu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2015, 06:52 AM
  2. Replies: 1
    Last Post: 10-22-2015, 05:50 AM
  3. 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
  4. 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
  5. [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
  6. 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
  7. 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

Tags for this Thread

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