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
-
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
6 hours, 28 minutes ago -
June KB5060842 update broke DHCP server service
by
Alex5723
4 hours, 59 minutes ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
9 hours, 2 minutes ago -
Excessive security alerts
by
WSSebastian42
4 hours, 43 minutes ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
18 hours, 30 minutes ago -
Ben’s excellent adventure with Linux
by
Ben Myers
31 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
5 hours, 39 minutes ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
15 hours, 33 minutes ago -
OS news from WWDC 2025
by
Will Fastie
19 hours, 44 minutes ago -
Need help with graphics…
by
WSBatBytes
3 hours, 1 minute ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
1 day, 9 hours ago -
Totally remove or disable BitLocker
by
CWBillow
9 hours, 6 minutes ago -
Windows 10 gets 6 years of ESU?
by
n0ads
12 hours, 21 minutes ago -
Apple, Google stores still offer China-based VPNs, report says
by
Nibbled To Death By Ducks
1 day, 20 hours ago -
Search Forums only bring up my posts?
by
Deo
29 minutes ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
2 days, 8 hours ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
2 days, 1 hour ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
2 days, 9 hours ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
2 days, 19 hours ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
2 days, 20 hours ago -
Disengage Bitlocker
by
CWBillow
2 days, 10 hours ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
2 days, 22 hours ago -
New Win 11 Pro Geekom Setup questions
by
Deo
23 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
3 days, 5 hours ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
3 days, 5 hours ago -
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
3 days, 9 hours ago -
New PC transfer program recommendations?
by
DaveBoston
1 day, 14 hours ago -
Windows 11 Insider Preview Build 22631.5545 (23H2) released to Release Preview
by
joep517
3 days, 13 hours ago -
Windows 10 Build 19045.6029 (22H2) to Release Preview Channel
by
joep517
3 days, 13 hours ago -
Best tools for upgrading a Windows 10 to an 11
by
Susan Bradley
3 days, 1 hour ago
Recent blog posts
- Ben’s excellent adventure with Linux
- Seconds are back in Windows 10!
- WebBrowserPassView — Take inventory of your stored passwords
- OS news from WWDC 2025
- Best tools for upgrading a Windows 10 to an 11
- Master patch listing for June 10, 2025
- 24H2 may not be offered June updates
- June 2025 updates are out
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.