Error 463 in VBA ("Class not registered on local machine") occurs because Excel or another Office app cannot find the required object library (e.g., Microsoft Forms, Microsoft Scripting Runtime, or a custom DLL). This happens after updates, user actions, or corruptions in system files. The fix is straightforward but requires careful steps to avoid data loss.
What You'll Need
- A working Excel or Office 2010+ installation
- Administrator rights (for registry or file registry updates)
- Registry Editor (only for experienced users; back up first)
- Windows Update history (to check for recent Office updates)
Step-by-Step Fix
- Restart Excel and your PC: Close all open Excel files. Restart Excel manually (right-click the taskbar icon > Exit) and restart your computer. This clears temporary registry references.
- Re-register the missing DLL (for Office 2010+):
- Open Command Prompt as Administrator (search "cmd", right-click > Run as admin).
- Run these commands one at a time, pressing Enter after each:
regsvr32 C:\Windows\System32\mscoree.dllregsvr32 C:\Windows\System32\mscorefonts.dll - Restart Excel again. If the error persists, try:
regsvr32 C:\Program Files\Common Files\System\WScript.dll(replace with your correct path if using 64-bit Windows).
- Reinstall Office via Settings (recommended for persistent issues):
- Go to Settings > Apps > Apps & features. Find Microsoft 365 or your Office version, then select Uninstall.
- Download the latest Office installer from Microsoft’s official site.
- Run the installer and follow the prompts. Keep default settings unless you specifically need older DLLs.
- Add the missing class library manually (for custom DLLs):
- Open the VBA editor (Alt+F11). In the Project Explorer window, right-click the project name > References.
- In the dialog, check Microsoft Forms 2.0 Object Library (or any missing library). If missing, add it by clicking Browse and locate:
-
C:\Windows\System32\OLEAUT32.dll, then click OK twice.
- Reset add-ins and themes (to rule out corrupted extensions):
- Open Excel > File > Options > Add-ins. In the dialog, select COM Add-ins under Manage, then click Go.
- Uncheck all add-ins, click OK > Close > OK again. Restart Excel.
- Repeat for themes: File > Options > Customize Ribbon > Themes > Load a Custom Ribbon Theme (unload all themes).
Common Mistakes
Skipping the restart
Excel and Windows cache registry changes. Always restart both after registry fixes, DLL re-registration, or add-in modifications.
Forgetting 64-bit vs. 32-bit paths
If using 64-bit Windows, DLLs like mscoree.dll must be registered in System32, not SysWOW64. Test with reg query HKEY_CLASSES_ROOT\mscoree.dll to confirm.
Reinstalling Office without removing old install
Old Office folders (e.g., C:\Program Files\Microsoft Office) may conflict. Use the built-in Uninstall tool to avoid remnants.
Tips to Prevent Recurrence
After fixing, add these habits:
- Run Windows Updates for Office DLLs (check Settings > Windows Update > Advanced options > Optional updates for Microsoft Office updates).
- Avoid disabling "Trust Center" settings in Excel as they protect against DLL corruption.
- For custom DLLs, test them in a fresh Excel Session first (create a new workbook).
- Install Office as an admin user; non-admin users lack permissions to register DLLs.
Troubleshooting
If the error persists after all steps, try these advanced methods:
- Repair Office installation: Reopen Settings > Apps > Apps & features, select your Office version, and click Modify > Quick repair. This restores files without full reinstallation.
- Use the Office Deployment Tool (for corporate environments):
Download from Microsoft’s GitHub: https://github.com/Microsoft/OfficeDeploymentTool. Configure a silent install with
msiexec /i OfficeSetup.exe /qn. - Restore Excel defaults (last resort):
- Backup your VBA projects (save as .zip).
- Close all Excel instances. Run:
reg delete "HKCU\Software\Microsoft\Office\16.0\Excel\Setup" /f(replace 16.0 with your Office version number). - Restart Excel and copy your VBA code back.
If nothing works: The issue may lie in Windows itself. Run:
sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth in an elevated Command Prompt to repair system files.
Frequently Asked Questions
Why does this error occur after Windows Update?
Updates sometimes break DLL dependencies between Windows and Office. Re-registering DLLs or reinstalling Office often fixes it.
How do I check if a DLL is missing without using Registry Editor?
Open Command Prompt and run:
reg query "HKEY_CLASSES_ROOT\mscoree.dll" /v Default. If you see REG_NONE, the DLL is corrupted or missing.
Will this fix break other Office features?
No, as long as you only re-register Office-specific DLLs (mscoree.dll, mscorefnts.dll). Avoid registering system DLLs from C:\Windows\System32 unless necessary.
What if my VBA code references a custom DLL?
Add the DLL to the References menu in VBA (Alt+F11 > References) and browse to the DLL’s location. Ensure the DLL is not corrupted by testing it in a new Excel file first.
Can I fix this without reinstalling Office?
Yes. Use regsvr32 for Office DLLs, or repair via the Office Setup tool. For custom DLLs, manually add them to References.
Why does "Microsoft Forms 2.0" fail to register?
This library often breaks after Windows updates or Excel installations. Try re-registering with:
regsvr32 C:\Windows\System32\msforms.dll or reinstalling the Forms library via:
DISM /Online /Add-Package /PackagePath:"C:\Windows\Installer\{Xxxx}.msi"
(replace {Xxxx} with the actual GUID).
Note: For Windows 10/11, Microsoft Forms is deprecated. Consider using the built-in Excel Tables or Power Query instead.