Return to VBA Code Examples

Fix VBA Run Time Error 32809

This article will demonstrate how to fix the VBA Run Time Error 32809.

The Run time Error 32809 is one of the most frustrating Excel VBA errors as there doesn’t seem to be any logical reason for the error. It can occur on one machine in an office environment, and then when a different machine runs the same macro, the error might not occur! This article will provide a few possible solutions to getting rid of the error.

Fixing a Corrupt XLSM File

One possible reason for this error is that the VBA Project may actually be corrupt.  A way around this without re-typing all the VBA code is to take a copy of the file, and then save it as a macro free file to remove the VBA Project entirely. You would then need to re-save it as a Macro enabled file and copy the code back into your new file.

Copy the file that is causing the error and then open the copied file in Excel.

In the Ribbon, select File > Save As and then change the format of the file to XLSX.

 

vbaerror 32809 saveas

 

Click Save to save the file and then close the file to completely remove the VBA Project from the file.

Open the original XLSM File and open your new XLSX file.

Press Alt+F11 to go to the VBE Editor.

OR

In the Ribbon, select Developer > Visual Basic.

 

vbacompile vbe

 

Note: If you don’t see the Developer Ribbon, you’ll need to enable it.

Select the XLSX file, and then in the Ribbon, select Insert > Module.

 

vbaerror 32809 insert module

 

Click in the original XLSM VBA Project and select the first module in that project by double-clicking on it.

 

vbaerror 32809 select module

 

Click in the code in the right hand side, and then press Ctrl+A to select all the code, and Ctrl+C to copy the code.

Click back in the new XLSX VBA Project that you have just created, and double-click on the new module.

In the right-hand side, press Ctrl+V to paste the copied code.

 

vbaerror 32809 paste module

 

If there is more than one module in your XLSM file, create a new module in the XLSX file, and paste in the code of the next module. Continue to do this until all the modules in the XLSM file are replicated.

Switch back to Excel by pressing Alt+F11 or Alt+Q; or in the Menu, select File > Close and Return to Microsoft Excel.

 

vbaerror 32809 close vbe

 

NOTE: Alt+F11 will switch back to Excel leaving the VBE open while Alt+Q will close the VBE.

Close the original XLSM file.

In the Ribbon, select File > Save As and save the new XLSX file as an XLSM file.  Click OK to replace the existing file with your new file.

 

vbaerror 32809 save xlsm

 

By re-creating the VBA Project, any corruption in the project will hopefully be removed and the error will be resolved.

Disable ActiveX Controls

Another possible fix is disabling any ActiveX controls that are used in the file that is causing the problem, and then enabling them again!

Open the file that is causing the error.

In the Ribbon, select File > Options and then (1) select Trust Center and (2) Trust Center Settings.

vba error 400 excel-options

OR

In the Ribbon, select Developer > Macro Security.

 

vba error macro security

 

Note: If you don’t see the Developer Ribbon, you’ll need to enable it.

Then,  select (1) ActiveX Settings. Ensure that (2) Disable all controls without notification is selected and then (3) click OK.

vbaerror 32809 trust center

Save the file with a new name, and then close the file.

Open the file, and then re-enable the ActiveX controls once again.

vba error enable controls

Ensure all Excel Updates are Installed on your PC

Microsoft is continuously releasing updates to the Microsoft Office. Ensure you have the latest updates for Excel by installing all available updates onto your PC.

 

 

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as


Learn More!