Solved

Securing Excel Sheet.

Posted on 2004-10-16
5
263 Views
Last Modified: 2010-08-05
Hi All,

This is related to Visual Basic Application (excel)
My question is :
I have a new excel sheet open and if we press ALT+F11 from Excel Sheet, it will open the Visual Basic Application or code window.
What should I do to secure my code?, like entering a user name and password before it opens the VB code window.

Also, I heard some one saying even though if you secure (asking for U.nane and PWD before entering to the VBA or VB code), it is very easy to break in to code. Is it true?

Please help me out to secure excel sheet.


Thanks
Have a good day
0
Comment
Question by:Tpaul_10
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 150 total points
ID: 12328713
This PAQ explains how to do it:
http://www.experts-exchange.com/Applications/MS_Office/Q_10293525.html

I don't know how secure or easy it is to break this security feature though.

~IM
0
 
LVL 81

Assisted Solution

by:byundt
byundt earned 150 total points
ID: 12330904
If you do a Google search for Excel VBA password crack, you will find a number of sources for commercial products that purport to break the password protecting a VBA project. It's harder to crack than the password protection for worksheets, but still relatively inexpensive in terms of time and money.

Compiled VB code will be more secure (as an add-in) than VBA.

If you stick with VBA, you should consider obfuscating your code. This involves:
1) Multiple instructions on each line of code, with no "structuring" for readability
2) Variable names should be as similar as possible--random combinations of letters and numbers are excellent choices
3) Include extra instructions that don't actually do anything--but look as though they are
4) Don't comment anything
0
 
LVL 3

Accepted Solution

by:
Fairco earned 200 total points
ID: 12332995
VBA password is one of the easiest to recover, since there's a built-in backdoor in Excel that enables bypassing of the password. Like byundt said, several commercial applications exist for activating the bypass method.

If you really want to protect your code, you should consider using the DRM-like document security system implemented in Excel 2003. Only users selected by the author can view (or modify) the workbook, and it requires .NET passport authentication from everyone acessing it. The security uses a more complex encryption to the whole document, therefore it can't be simply bypassed. Kinda strong stuff and well designed. I recommend taking a look at it. One drawback is that only Excel 2003 can fully decrypt the document, therefore everyone accessing it must have Excel 2003. You can set Excel 2000 compatibility for viewing, but that's really weak.
0
 

Author Comment

by:Tpaul_10
ID: 12667331
Thanks to all of you Guys.
All of your feedback and information is very usefull.

Thanks
Have a great day
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question