Hey everyone. I just joined to post this question.

I have a line of code in my routine to delete some lines from ThisWorkbook as follows:

ActiveWorkbook.VBProject.VBComponents("ThisWorkbook").CodeModule.DeleteLines 8,4

When I run the macro, I get an error message:
Run time error '1004':
Programmatic access to Visual Basic Project is not trusted.
It won't give me the option to Continue, only to End or Debug. Is there any way around this error? Setting DisplayAlerts to false doesn't do it, I'm sure because it's a system thing.

Do I have any options here?