ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   protect/unprotect a VBA Project (https://www.excelbanter.com/excel-programming/330069-re-protect-unprotect-vba-project.html)

mangesh_yadav[_213_]

protect/unprotect a VBA Project
 

something like this:


Sub ProtectSht(sht)
sht.Protect Password:=pwd, DrawingObjects:=True, contents:=True
Scenarios:=True
End Sub


Sub UnprotectSht(sht)
sht.Unprotect Password:=pwd
End Sub


Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=37385


helmekki[_59_]

protect/unprotect a VBA Project
 

Thank u 4 your reply

i ment is there a vba code to remove protection from the protected vb
project ?

sometimes vba projects are protected, so i am lookinf for a code t
remove protection from the protected vba project ........

the code to remove protection might be placed in a workbook and be use
to remove protection from a protected vba project that exists in
different workbook

--
helmekk

-----------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...nfo&userid=693
View this thread: http://www.excelforum.com/showthread.php?threadid=37385


helmekki[_58_]

protect/unprotect a VBA Project
 

any idea yet ????


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=373852


dominicb[_5_]

protect/unprotect a VBA Project
 

Good evening Helmekki

We are all pretty much aware that the protection for worksheets and
structure is a little bit flimsy (to say the least!). However, the
routines used to protect VBA routines and password protected files is a
little bit more robust - but that is not to say it cannot be cracked,
just not by a macro. If you need to open a password protected project
you can buy specialist software to do so, or pay a service where you
e-mail your file to a company and get it back several hours later
unprotected.

It can be done using a hex editor, and if your file is not highly
confidential I would be prepared to remove the password for you. No
charge.

But it CANNOT be done from within Excel.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=373852


helmekki[_60_]

protect/unprotect a VBA Project
 


Ok dominicb, Thank u very much

I uploaded the addin that i would like to remove the password from the
protected project.

pls see the attached addin.

Thank u


+-------------------------------------------------------------------+
|Filename: password.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3426 |
+-------------------------------------------------------------------+

--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=373852


dominicb[_6_]

protect/unprotect a VBA Project
 

Hi Hesham

Slight problem in that the program is not a VBA program, but has been
written using VB (similar, but different). VB allows for standalone
applications to be written and compiled modules to be used as excel
add-ins, and compiled modules will look like mumbo jumbo (if you're not
English you won't understand this term, but it means muddled up and
confused!) and would not make sense.

So how can you tell if an add-in is compiled VB or standard VBA (which
is compiled at run time)? Well, if you are prompted for a password, it
is VBA. If the message is "This project is unviewable" it is compiled
code. However, if you want to know how the program does what it does,
have a quick look here for VBA code to do what this add-in does, and a
bit of interesting information about how the password crackers work.

http://www.mcgimpsey.com/excel/removepwords.html

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=373852


helmekki[_61_]

protect/unprotect a VBA Project
 

Thank u very much dominic

--
helmekk

-----------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...nfo&userid=693
View this thread: http://www.excelforum.com/showthread.php?threadid=37385



All times are GMT +1. The time now is 08:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com