Solved

VBA Coding

Posted on 2013-07-01
7
466 Views
Last Modified: 2013-07-01
Hi Experts,

A.If workbook is password protected then is there is any way to crack it in Office 2010.

B.If workbook is password protected - if any one entered wrong password - then it delete all sheets (Except 1 which is predefine) - delete all module & VBA - change password to which one is entered.Before openning of workbook.


Thanks
0
Comment
Question by:itjockey
  • 3
  • 3
7 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39289616
A. Yes there are ways to do it, but you won't get any information here as how to.
B. You can code to delete all sheets and modules, but I don't think you can have the code triggered by the internal excel protection, you will have to setup a custom password prompt.
This should give you a push in the right direction. If you need specific information please rephrase your question.
0
 
LVL 8

Author Comment

by:itjockey
ID: 39289650
A. Yes there are ways to do it, but you won't get any information here as how to.

why I won't get any information here?

B. I don't mind with custom password.

Events - if any one insert wrong password - things done before opening.
Delete all sheets except one - delete all module - Code - even that code which is performing this task.
Set entered password as new password.
so it self destruction VBA.

Thanks
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 250 total points
ID: 39289837
If the workbook is password protected for opening, then I wouldn't even attempt it without commercial software.

For B, that's a waste of time. The user could simply disable macros.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 8

Author Comment

by:itjockey
ID: 39289845
For B but user don't have that kind of knowledge to disable macros.
0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 250 total points
ID: 39289858
Macros are automatically disabled on new files if security setting is set to high. To overcome that you have to manually add the new file (or it's location) to the list of trusted files (or locations). See my article http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/A_10805-Overcome-the-Trust-Center-Nuisance.html for several methods to accomplish that.
0
 
LVL 8

Author Closing Comment

by:itjockey
ID: 39289871
thanks for your information.......
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39289880
why I won't get any information here?
Because its against EE's regulations, we cannot assist in cracking, and that is in essence what you are asking.

You shall not engage in any of the following activities... or pirating software... Posting any content that infringes any third party’s intellectual property rights or violates any confidentiality Agreements, contracts of employment, licenses, “Terms of Use”, or copyright

The easiest way to accomplish your objective is by following these steps:
1. Prompting user for password on opening of file
2. Save entered password to temp file
3. if password doesn't match:
     a. disable breaking of code
     b. export the wanted worksheet to a new file, naming it the name of the original file.
     c. export the module containing the code to the new file
     d. set the new password in the exported module
3. Delete the original file.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

778 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