+ Reply to Thread
Results 1 to 10 of 10

VBA Error (Class Not Registered)

  1. #1
    Registered User
    Join Date
    07-01-2020
    Location
    miami, Fl
    MS-Off Ver
    2016
    Posts
    5

    VBA Error (Class Not Registered)

    Hi everyone,

    I hope someone can help me. I have an Excel 2016 macro on Win10 that is not working for me. The following VBA line is raising an error that says "(Class not registered)"

    Please Login or Register  to view this content.

    Anyone know what needs to be done to correct this? Please.
    Last edited by alansidman; 07-02-2020 at 01:18 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: VBA Error (Class Not Registered)

    welcome to the forum

    For future reference, please take a moment to read the forum rules and use thread titles that are descriptive of your problem - not what you think the answer might be. (think google search terms?).

    Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?

    I have changed the title for you today. Please read the rules and abide by them in the future.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,008

    Re: VBA Error (Class Not Registered)

    Are you using 32 or 64bit Office? Which references do you have set in the VBA Project?
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    07-01-2020
    Location
    miami, Fl
    MS-Off Ver
    2016
    Posts
    5

    Re: VBA Error (Class Not Registered)

    Hi, I'm using 64 bit office, and these are the references:

    Visual Basic For Applications
    Microsoft Excel 16.0 Object Library
    OLE Automation
    Microsoft Office 16.0 Object Library
    Microsoft Forms 2.0 Object Library
    Ref Edit Control
    Microsoft DAO 3.6 Object Library
    Microsoft Access 16.0 Object Library

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,008

    Re: VBA Error (Class Not Registered)

    DAO3.6 is not compatible with 64bit Office. You need to replace it with the Microsoft Office 16.0 Access Database Engine Objects library instead.

  6. #6
    Registered User
    Join Date
    07-01-2020
    Location
    miami, Fl
    MS-Off Ver
    2016
    Posts
    5

    Cool Re: VBA Error (Class Not Registered)

    Thanks Rorya,

    Looks like i have some rewriting to do as the existing code using DAO has statements such as dim db as Database and dim rs as recordset which at first glance seems to not supported with the replacement reference.
    Hopefully it won't be too painful.

    Once again, thanks!

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,008

    Re: VBA Error (Class Not Registered)

    They should be supported. You shouldn't need to change any of the code. If you're having an issue, I suspect you selected the wrong reference (and of course you need to remove the DAO3.6 reference)

  8. #8
    Registered User
    Join Date
    07-01-2020
    Location
    miami, Fl
    MS-Off Ver
    2016
    Posts
    5

    Re: VBA Error (Class Not Registered)

    You were correct Rorya, I had the wrong reference. Some of those reference names are so similar. Now it works and I don't have any painful rewriting to do. Super duper thanks.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,040

    Re: VBA Error (Class Not Registered)

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  10. #10
    Registered User
    Join Date
    07-01-2020
    Location
    miami, Fl
    MS-Off Ver
    2016
    Posts
    5

    Re: VBA Error (Class Not Registered)

    Thanks, I didn't know where to mark it solved. So now it's marked 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. Replies: 4
    Last Post: 08-31-2016, 10:04 AM
  2. [SOLVED] Excel RTD with DCOM -- "Class not registered" error
    By Mike K in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2005, 11:30 AM
  3. Class not registered error
    By Windows User in forum Excel General
    Replies: 1
    Last Post: 11-21-2005, 09:45 AM
  4. [SOLVED] Class not registered error
    By Windows User in forum Excel General
    Replies: 0
    Last Post: 11-21-2005, 02:05 AM
  5. Replies: 3
    Last Post: 07-19-2005, 03:01 PM
  6. "Class not registered" startup error
    By GeorgeB in forum Excel General
    Replies: 1
    Last Post: 05-17-2005, 10:04 AM
  7. Class not registered
    By Piranha in forum Excel General
    Replies: 1
    Last Post: 04-17-2005, 08:35 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