Class Not Registered VBA Error: How to Fix It [Excel]

Reading time icon 4 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • Many users have reported encountering the Class not registered VBA error when running a macro in Excel.
  • This could be due to missing DLL files, corrupt system files, or issues with Microsoft Office itself.
  • To solve the error, repair Microsoft Office, run the DISM and SFC scan, or try the two other fixes here.
Fix Class not registered VBA error

Though the Microsoft Office suite is one of the best products in the category, users often come across errors in it. One such is the Class not registered VBA error in Microsoft Excel.

The error is usually encountered when trying to run a macro in Excel, though that’s not always the case. When this happens, you are unable to perform the desired function.

However, the Class not registered VBA error is not as intricate as it appears, and we have listed the best fixes for it in the following section.

How do I fix the Class not registered VBA error?

1. Repair Microsoft Office

  1. Press Windows + R to launch the Run command, type appwiz.cpl in the text field, and either click on OK or hit Enter to launch the Programs and Features window.appwiz.cpl
  2. Locate the Microsoft Office entry, select it, and then click on Change.Change to fix class not registered vba
  3. Click Yes in the UAC (User Account Control) prompt that pops up.Click Yes
  4. Now, select the Online Repair option, and click on the Repair button to start the process.Online repair to fix class not registered vba

The repair process is found to eliminate a lot of issues with Microsoft Office including the Class not registered VBA error. If this method doesn’t work, head to the next one.

2. Register critical DLL file

  1. Press Windows + S to launch the Search menu, enter Windows Terminal in the text field at the top, right-click on the relevant search result, and select Run as administrator from the context menu.Windows Terminal to fix class not registered vba
  2. Click Yes in the UAC prompt that appears.Yes
  3. Now, click on the downward-facing arrow, and select Command Prompt from the list of options. Alternatively, you can hit Ctrl + Shift + 2 to launch Command Prompt.Command Prompt to fix class not registered vba
  4. Type/paste the following command and hit Enter:cd C:\Windows\SysWOW64\Execute command
  5. Now, execute the following command to register the required DLL file:Regsvr32 fm20.dllregister dll file to fix class not registered vba

Another quick way to register missing DLL files or replace the corrupt ones is to use a reliable third-party tool. These tools will also look for corrupted files and repair the damage caused.

3. Run DISM and SFC scan

  1. Press Windows + R to launch the Run command, enter wt in the text field, press and hold the Ctrl + Shift key, and then click on OK or hit Enter to launch an elevated Windows Terminal.Windows Terminal
  2. Click Yes in the UAC prompt.Click Yes
  3. Click on the arrow at the top, and select Command Prompt from the dropdown menu. Command Promp to fix class not registered vba
  4. Now, paste the following three commands one at a time, and hit Enter after each to run the DISM tool:DISM.exe /Online /Cleanup-image /Scanhealth DISM.exe /Online /Cleanup-image /Restorehealth DISM.exe /online /cleanup-image /startcomponentcleanup
  5. Now, execute the following command to perform the SFC scan:sfc /scannowSFC scan to fix class not registered vba

The SFC (System File Checker) scan and DISM (Deployment Image Servicing and Management) tool are two effective methods to fix a bunch of issues having to do with corrupt system files or problems with the Windows image.

4. Update Microsoft Office

  1. Launch any Microsoft Office app, and open a new blank document.
  2. Now, click on the File menu near the top-left corner.File menu to fix class not registered vba
  3. Select Account from the list of options on the left.Accounts
  4. Next, click on the Update Options button under Product Information.Update options
  5. Finally, select Update Now from the options in the flyout menu.Update now to fix class not registered vba
  6. Wait for the update to install, if there’s one available.

If it’s a problem with the current version, try installing the latest version of Microsoft Office.

These are all the ways you can fix the Class not registered VBA error when trying to run macro in Excel. In case none of the methods here help, upgrade to the latest iteration of MS Office available.

Also, find out how to fix the VBA runtime error 1004.

If you have any other queries or know a method that’s not listed here, please drop a comment in the section below.

More about the topics: Excel, Microsoft Office

User forum

0 messages