I’m protecting Word vba code with password protection. The passwords however can be easily traced by software from lostpassword.com.
Is there a more sophisticated way for password protection?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
password protection (vba )
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » password protection (vba )
- This topic has 8 replies, 7 voices, and was last updated 22 years, 9 months ago.
AuthorTopicWSricomazereeuw
AskWoody LoungerSeptember 2, 2002 at 4:34 pm #375867Viewing 2 reply threadsAuthorReplies-
WSHoward Kaikow
AskWoody LoungerSeptember 2, 2002 at 9:23 pm #613382Use long randomly generated passwords.
Obfuscate your code by:
1. Elminating all comments.
2. Eliminating most white space.
3. In distributed code, choose meaningless, randomly selected, variable names.
4. After doing the above, put multiple statementss on a line.This will discourage most from even attempting to figure out the code.
-
WSSteveH
AskWoody LoungerSeptember 3, 2002 at 10:51 am #613503For another slant on this…
http://mindprod.com/unmain.html%5B/url%5D
-
WScharlotte
AskWoody Lounger-
WSHoward Kaikow
AskWoody LoungerSeptember 3, 2002 at 8:41 am #613487You better believe it.
I have my own code obfuscator.
Even I cannot undefstand, without a great deal of effort, my own code after obfuscation.MSFT does not care about protecting our intellectual property in VS .NET. Note that in VS .NET, code obfuscation is really the only way to protect code as it is not difficult to see other’s code. There are already 3rd party code obfuscators available for VS .NET. However, I do not wish to discuss this topic, it’s too depressing!
P.S. I forgot to mention, that not only does code obfuscation make it very expensive for others to steal/read your code, judicious choice of variable names wil usually reduce the size of the code by over 30%. Has a big impact on the size of a Word template for distribution.
-
WSHoward Kaikow
AskWoody LoungerSeptember 5, 2002 at 4:25 pm #614420I have been asked whether I wish to share, or sell, my code obfuscator. The answer is NO.
For VS .NET, there are already several commercial code obfuscators available and Dan Appleman has a free code obfuscator, for which there is a downloadable e-book available for, as I recall $39.95). I believe that Dan’s obfuscator can be found at http://www.abderaware.com/WhitePapers/Obfuscator.htm%5B/url%5D.
For VB/VBA, there likely are also code obfuscators, but I never looked into getting them.
In my case:
1. I have code that does a pretty good job of building a list of variables, and procedures, using an exception list to not change names that I wish to make Public. My code REQUIRES that one use Option Explicit, i.e., I did not want to have to parse for variable names.
2. I then generate random names in a mapping table. The name space is always the same, e.g., x, x1, zz, but the mapping is random.
3. Lastly, I use the brute force approach to replace names. Again, I do not use a parser, so it is possible that non-judicious choices of variable names that are keywords.methods, etc., can get screwed up. However, I rarely make that mistake, so my code works for me. Writing a ful blown parser for VB/VBA might be interesting, but I’d rather spend my time elsewhere.
-
WSMichaelRead
AskWoody Lounger
-
-
WSgwhitfield
AskWoody Lounger-
WSchrisgreaves
AskWoody LoungerSeptember 10, 2002 at 10:15 am #615489I did this for about three months start of this year, but have retreated to using password-protected DOT files.
Passwords for 40 templates isn’t difficult. Each password is three or more words based on my childhood (who else would know the name of the street that housed the cotton mill on my way to school on the Burnely bus?), and the Passwords.doc that I carry in my shirt pocket doesn’t carry the password, it says “name of the street that housed the cotton mill on my way to school on the Burnely bus” rather than “lovecloughclose”.
Oooops!
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Lost sound after the upgrade to 24H2?
by
Susan Bradley
6 hours, 30 minutes ago -
How to move 10GB of data in C:\ProgramData\Package Cache ?
by
Alex5723
7 hours, 25 minutes ago -
Plugged in 24-7
by
CWBillow
14 hours, 46 minutes ago -
Netflix, Apple, BofA websites hijacked with fake help-desk numbers
by
Nibbled To Death By Ducks
19 hours, 38 minutes ago -
Have Copilot there but not taking over the screen in Word
by
CWBillow
16 hours, 47 minutes ago -
Windows 11 blocks Chrome 137.0.7151.68, 137.0.7151.69
by
Alex5723
2 days, 10 hours ago -
Are Macs immune?
by
Susan Bradley
8 hours, 50 minutes ago -
HP Envy and the Function keys
by
CWBillow
1 day, 18 hours ago -
Microsoft : Removal of unwanted drivers from Windows Update
by
Alex5723
52 minutes ago -
MacOS 26 beta 1 dropped support for Firewire 400/800
by
Alex5723
2 days, 22 hours ago -
Unable to update to version 22h2
by
04om
6 hours, 33 minutes ago -
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
3 days, 5 hours ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
3 days, 5 hours ago -
Very Quarrelsome Taskbar!
by
CWBillow
2 days, 15 hours ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
3 days, 18 hours ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
3 days, 7 hours ago -
Is your battery draining?
by
Susan Bradley
7 hours, 11 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
7 hours, 11 minutes ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
3 days, 22 hours ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
56 minutes ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
3 days, 6 hours ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
2 days, 23 hours ago -
National scam day
by
Susan Bradley
2 days, 6 hours ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
3 days, 2 hours ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
4 days, 23 hours ago -
Tools to support internet discussions
by
Kathy Stevens
3 days, 12 hours ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
4 days, 14 hours ago -
AI is good sometimes
by
Susan Bradley
5 days, 6 hours ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
4 days, 20 hours ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
6 days, 7 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.