How to vba code?

S

sjw

In MS Access I can hide my code by converting from a .mdb to a .mde

Is there something similar in Word to prevent users from accessing the code?
 
J

Jay Freedman

In the VBA editor, go to Tools > Project Properties > Protection.
Check the "Lock project for viewing" box and supply a password.

This won't stop a determined attack, but it will prevent casual
snooping and inadvertent changes.

If you need something more secure than that, write your code in VB6
and compile it to a DLL. Then in VBA write a macro that just calls the
DLL.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
S

sjw

PERFECT!

Thanks Jay

Jay Freedman said:
In the VBA editor, go to Tools > Project Properties > Protection.
Check the "Lock project for viewing" box and supply a password.

This won't stop a determined attack, but it will prevent casual
snooping and inadvertent changes.

If you need something more secure than that, write your code in VB6
and compile it to a DLL. Then in VBA write a macro that just calls the
DLL.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top