PDA

View Full Version : Solved: Remove All Macros With VBA-Password Set...



Wolfgang
08-24-2006, 11:23 AM
Hi All...
I have a macro which will remove all macros if a certain condition is met...
No problems with that..
Since I protected the VBA-Project Properties it will not run, of course...
What is the proper coding for such a function?! please...
Thank you...
Best,
Wolfgang

PS: Already tried earlier today at http://www.xtremevbtalk.com/showthread.php?t=269314

Jacob Hilderbrand
08-24-2006, 09:21 PM
Although there is no direct way to unprotect a vbe password, there is a workaround. But in uses SendKeys...

http://www.mrexcel.com/board2/viewtopic.php?t=61780

Wolfgang
08-24-2006, 11:32 PM
Good Morning Jake...

I wasn't aware of the fact that this is such a pain to accomplish...
Thank you very much for the link/sublinks which give me some work to do...

I will let you know how I succeeded with this...as I said the macro from Chip Pearson works fine and effectively removes all coding...but VBA needs to be unprotected first...

Best,
Wolfgang

Jacob Hilderbrand
08-25-2006, 11:03 AM
You're Welcome :beerchug:

Let me know if you have any problems setting this up. Also note that SendKeys are not the most reliable thing to use, but they are the only option that I am aware of.

Wolfgang
08-25-2006, 11:26 AM
Hi Jake...
I just finished testing...phew...........

Rationale: Tom's does not work at all with MO-2003 Pro SP2...

Ivan's also does not work....BUUUUUT makes the workbook totally unusuable....which was intended!!!!!!

By does not work I mean, Tom's can't break the VBA-Protection code that I use...21 characters but leaves the program intact...bad Karma...

Ivan's does not break the protection either, but as I said leaves a mess behind...good Karma...

So, in the end I got what I wanted....

On the other hand, it is rather silly to do such things because any knowledgeable stealer will break the password anyway...but still, I learned a lot today...

Again, thank you very much for your info and have a nice weekend in beautiful California...remember those days way back in time at San Rafael...Yeah...

Best,
Wolfgang