+ Reply to Thread
Results 1 to 12 of 12

Previously working Macro-enabled file now throwing "Class not registered"

  1. #1
    Registered User
    Join Date
    01-31-2020
    Location
    Los Angeles
    MS-Off Ver
    MS Office 365
    Posts
    6

    Previously working Macro-enabled file now throwing "Class not registered"

    Hello -

    I have a large Excel file with a bit of code that I found on the web and copied because it accomplished exactly what I needed. It worked fine for months.. I subsequently had a laptop issue and had to reset my Windows installation, which also required me to re-download Office 365 from the MS website and install it again. Now the Excel file throws this error upon file save: "Run-time error '-2147221164 (80040154)':" and "Class not registered".

    When I click Debug in the pop-up window, it appears to be choking on this line of code:
    Set GetJavaScriptControlObject = CreateObject("MSScriptControl.ScriptControl")

    I tried implementing some suggestions I found on a Google search but kind of hit a dead end. A lot of this is Greek to me. Can anyone help identify a cause / fix for this?

    Much appreciated!
    jbayko

  2. #2
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Previously working Macro-enabled file now throwing "Class not registered"

    If you go to the vba Editor (alt + F11) -> Tools -> References do you have a line that says missing? If so, uncheck it and see if this solves your problem.
    Also make sure that in the references Microsoft Office xx.x Object library is checked. (xx.x is the officeversion for example 16.0)
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    01-31-2020
    Location
    Los Angeles
    MS-Off Ver
    MS Office 365
    Posts
    6

    Re: Previously working Macro-enabled file now throwing "Class not registered"

    Quote Originally Posted by dotchiejack View Post
    If you go to the vba Editor (alt + F11) -> Tools -> References do you have a line that says missing? If so, uncheck it and see if this solves your problem.
    Also make sure that in the references Microsoft Office xx.x Object library is checked. (xx.x is the officeversion for example 16.0)
    Thank you for your reply. Unfortunately, I don't believe either of these suggestions is relevant (see screenshot linked below). I don't see anything which says "missing", and "Microsoft Office 16.0 Object Library" is checked.

    Do you have any other suggestions? This constant error message is very annoying and obviously is causing functionality in my workbook to fail.

    Attachment 660629

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi,

    as a Windows issue see with your IT …

  5. #5
    Registered User
    Join Date
    01-31-2020
    Location
    Los Angeles
    MS-Off Ver
    MS Office 365
    Posts
    6

    Re: Previously working Macro-enabled file now throwing "Class not registered"

    Quote Originally Posted by Marc L View Post
    Hi,

    as a Windows issue see with your IT …
    Hmmmm...sitting on my couch, unfortunately, my IT is me. Thanks anyways.

    If anyone else has suggestions, I'd greatly appreciate it.

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    By default this error message means your Windows does not have the necessary, whatever a file or a key in the Registry database.

    The other error sources as yet stated can be a missing reference in error in the references list or an add-in which badly interferates …

  7. #7
    Registered User
    Join Date
    01-31-2020
    Location
    Los Angeles
    MS-Off Ver
    MS Office 365
    Posts
    6

    Re: Previously working Macro-enabled file now throwing "Class not registered"

    Quote Originally Posted by dotchiejack View Post
    If you go to the vba Editor (alt + F11) -> Tools -> References do you have a line that says missing? If so, uncheck it and see if this solves your problem.
    Also make sure that in the references Microsoft Office xx.x Object library is checked. (xx.x is the officeversion for example 16.0)
    Hi dotchiejack. I just noticed something. This Microsoft Office xx.x Object library which you say I need to have checked. Well, I noticed that this DLL is not in the location it is expecting. I also performed a search of my entire C: drive and that DLL is nowhere to be found. How does this happen? I installed MS Office 365 without any customization. What am I supposed to do now?

    Screen shot of Excel > VBA Editor > Tools > References (shows file path where it is expecting Microsoft Office xx.x Object library to be):
    Attachment 660660

    This directory on my computer with hidden files showing, but DLL nowhere to be found:
    Attachment 660661

  8. #8
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Previously working Macro-enabled file now throwing "Class not registered"

    Attachments are invalid.

  9. #9
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,915

    Re: Previously working Macro-enabled file now throwing "Class not registered"

    An error with CreateObject is unlikely to be due to a reference issue, since it just looks up the class in the registry and doesn't depend on references.

    Are you using 32bit Office (not Windows) or 64bit?

    Also, you should really mention that you have cross-posted this in other forums.
    Rory

  10. #10
    Registered User
    Join Date
    01-31-2020
    Location
    Los Angeles
    MS-Off Ver
    MS Office 365
    Posts
    6

    Re: Previously working Macro-enabled file now throwing "Class not registered"

    Quote Originally Posted by rorya View Post
    An error with CreateObject is unlikely to be due to a reference issue, since it just looks up the class in the registry and doesn't depend on references.

    Are you using 32bit Office (not Windows) or 64bit?

    Also, you should really mention that you have cross-posted this in other forums.
    Hello -

    Sorry for the late reply. This problem is important to me. I didn't realize the cross posting thing was a faux pas. I'll be more careful next time.

    To answer your question, I just verified that my Office installation is 64bit.

    Really hope you can help me

  11. #11
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,915

    Re: Previously working Macro-enabled file now throwing "Class not registered"

    As far as I know, the script control is a 32bit component and there isn't a 64bit version of it, so it won't work on 64bit Office.

  12. #12
    Registered User
    Join Date
    01-31-2020
    Location
    Los Angeles
    MS-Off Ver
    MS Office 365
    Posts
    6

    Re: Previously working Macro-enabled file now throwing "Class not registered"

    Quote Originally Posted by rorya View Post
    As far as I know, the script control is a 32bit component and there isn't a 64bit version of it, so it won't work on 64bit Office.
    Yes! Installing the 32-bit version worked. Thank you so much.

+ 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. CommandBars("Worksheet Menu Bar").Controls("Tools").Enabled = Fals
    By Arturo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2015, 05:43 AM
  2. [SOLVED] Stop Users Saving Macro Enabled File as ".xlsx"
    By OzTrekker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2012, 11:33 PM
  3. Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" not working
    By redders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2011, 03:52 PM
  4. Replies: 3
    Last Post: 03-17-2009, 01:59 PM
  5. [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
  6. Replies: 3
    Last Post: 07-19-2005, 03:01 PM
  7. [SOLVED] Message "class not registered" opening sheet with macros Excel 97
    By PlanetSavers in forum Excel General
    Replies: 1
    Last Post: 07-04-2005, 02:05 PM
  8. "Class not registered" startup error
    By GeorgeB in forum Excel General
    Replies: 1
    Last Post: 05-17-2005, 10:04 AM

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