hilkoc / vbaDeveloper

Tools for development and version control of vba code
MIT License
510 stars 138 forks source link

Fix "Menu.exportVbProject" "CodeModule" runtime error -2147467259 #48

Open cakimie opened 4 years ago

cakimie commented 4 years ago

Prevents access to unexisting "codeModule" property of "project" "ThisWorkbook" when exporting via "VbaDeveloper > Export code for... > VBAProject (...)".

Original error message after trying to export

workbook

Debugging the previous error

XLAM

Fix

The fix consists of simply checking for the existence of the codeModule property before access.