Share via

MS Excel 2010: Runtime error 1004

Anonymous
2019-04-14T13:42:47+00:00

Hi everyone,

I have a vba code. The code runs well. But when I tried to protect sheet, it prompts me runtime error 1004.

I did a google search and in the macro setting, I checked the option "trust access to the VBA project object model".

I also checked the option "enable all macros.

However the error still persisted until I unprotected the worksheet.

My question: how to protect the worksheet and keep the vba code running well?

Thank you,

Ben Lee

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2019-04-15T17:57:14+00:00

    Hi Ronse,

    Awesome. The code works perfectly and no more errors.

    I was just missing that piece and that excel looked like it was going to fail.

    You are indeed truly an expert. 

    Thank you very much.

    Best Regards,

    Ben Lee

    Was this answer helpful?

    0 comments No comments