Since your trying to access the vbproject of the workbook you need to manually check the "Trust access to your Visual Basic Project" in the Tools > Macro > Security dialog.