-2

I am about to submit my big VBA project in Excel, and have come across one last concern.

I have protected all my macros, but how can I set this Excel so that users cannot either A) Access the 'Developer' Tab, or B) Create new macros?

Tom Stone
  • 39
  • 5
  • Check out this https://social.msdn.microsoft.com/Forums/office/en-US/58cdb951-e303-412d-bdf6-6fa6ab0ade2f/prevent-users-from-creating-or-editing-vba-macros?forum=exceldev – Maldred Dec 18 '17 at 17:13
  • @Maldred I already checked that, and found the answer to be unsatisfactory. I am hoping that there is a way to do it in the Excel sheet itself, rather than establishing a company-wide tech policy. – Tom Stone Dec 18 '17 at 17:17
  • 1
    Lock the VBA Project for Viewing by right-clicking on it, and going to protection etc. Not great protection, but as Mats Mug says, it stops the casual person from goofing around with the code. Obviously anyone who wants to get in will do so, but it depends whether you are just trying to stop wannabe macro writers, or really keep secure info away from folks.... – MacroMarc Dec 18 '17 at 17:43

1 Answers1

2

You can't.

I mean, you can try, and probably stop an accountant or sales analyst from looking at or editing the code, but you won't stop anyone that wants or needs to go in.

In other words "protecting" the VBA code will only annoy you, the maintainer. It will prevent a cat from accidentally accessing the code, but anyone with access to a hex editor (or not) will laugh at it.

Unless you're using some good 3rd-party tools to obfuscate/encrypt/protect (/corrupt) your VBA project (listing 3rd-party tools is beyond the scope of this site)...

VBA code is not secure, full stop.

Mathieu Guindon
  • 69,817
  • 8
  • 107
  • 235