Removing VBA Password in AutoCAD

Both AutoCad and MicroStation can now be automated/extended using VBA. This is fabulous. In my current working environment, these programs are used extensively, and a lot of software has been written for it. But unfortunately as well, a lot of programmers have come and went again. So i was left with a program to change, which was locked using a password. A VBA password. I am not quite sure why one would do such a thing, one valid reason would be that some user would accidently get into to the code, and change stuff? No idea. Stop reverse engineering? I could get into a whole discussion about protecting knowledge and sharing knowledge. Anyway, i needed to get in the code, and the person was either unreachable or not willing or forgot the password himself. So i looked for ways to break a VBA password. Apparently there is a very simple way, which took my hours to find. In the *.dvb file, look for the tag "DPB=", and replace that with "DPx=" using a hex editor. Load the project, click through all error-messages, open the properties of the project, and set the password again to something you know and remember, and after that you can remove the password protection all together (if you want). A more detailed description can be found here. This method seems to work for Excel, AutoCAD, let me know if it works for other VBA password protected documents or applications (e.g. Word/Access/... ??).
Comments
Tom Haws 2010-09-17 05:54:11 UTC

Thank you so much. We really needed this. I am still hoping that the password can be located, but seeing this work is a great potential fall-back for us. Tom

Anton 2010-11-25 16:50:57 UTC

Thank you very much for this information! I wrote a VBA tool last week and (I AM REALLY STUPID) forgot the password... Now I have my code back! Thanks!!! BTW. a real free HEX editor can be found here: http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

Oleg 2011-03-10 11:38:51 UTC

Hi, could you say why you proposal to use HEX editor when it can be used by notepad?

Nathan 2011-03-10 11:53:59 UTC

This is a long time ago. But as far as i remember it is a vba-file is binary format, and you want to make sure your ascii editor doesn't mess with any other characters. But if it works for you using notepad, go ahead :) In my case i had to use a hex editor.

Oleg 2011-03-10 13:32:30 UTC

Yes, After editing a Excel file with notepad it does not open by clicking on it. OK, with Excel the procedure written on: http://www.schmittis-page.de/index.html?/excel/vba/t48e.htm works well.

jj 2011-10-05 04:10:16 UTC

Greetings, Thank you very much for this excellent and easy trick. For me it works very well!

mohamd azimi 2012-01-01 18:56:23 UTC

Thank you for you excellent guide

Anton 2012-04-26 09:38:57 UTC

Thank you very much!

hamed 2012-08-02 10:12:48 UTC

thank you. i hope that it work.

fred seaman 2013-01-02 07:30:25 UTC

Thank you very much! It worked perfectly on MicroStation. I just think it's important to remember that the tag “DPB=” appears more than once in the file, and you must find out which is the correct one.

johhny 2013-02-01 07:53:07 UTC

works! saved my life!

rio 2013-02-19 16:22:41 UTC

Hey guys, can you please help. I tried to do the same instruction but to no avail. I opened the dvb file in notepad and replace DPB with DPx. I load the file in autocad and it said "failed to open the project". I install and tried to open it using the link above on HEX editor but cannot find the DPB file. Thanks.

santosh 2013-05-19 20:34:59 UTC

great great great thank you. I will remember you. thanks a lot.

Joe 2013-06-25 12:43:17 UTC

Hi plz let me know what *.dvb file I must look into ....I found 80 files with .dvb extension....thanks in advance...

Surya 2013-08-09 11:59:48 UTC

great It worked perfectly

Johnson 2013-12-03 12:46:34 UTC

Thanks a lot. It worked.

edy 2014-06-03 00:11:24 UTC

Thank you! It works :) I hope those codes will be opensource, vba codes will help us to improve our CAD skills :)

Evord 2015-02-16 09:17:35 UTC

You must use the Hex Editor don't use Notepad, otherwise it wont work

Dmitry 2015-04-24 14:48:07 UTC

Hi, I'm sorry, I'm from Russia, that's why my english so bad. Hope, you can understand me. I have file *.dvb & this file was blocked by password. I do not know password and I do not know person who did this file. Any way I need to correct file for working for AutoCad 2015 (now this file work only for AutoCad 2011) Can you help me remove protection? I couldn't to find the tag “DPB="

Hoang Anh 2015-10-17 03:28:23 UTC

It's really good. It's successfull in all example. Thanks much.

ndc 2016-05-12 16:42:45 UTC

tx worked

ThinhP 2016-06-22 09:20:35 UTC

good job, itworks

Alisa 2016-08-31 09:51:17 UTC

The Autocad DVB Password Remover tool can unlock the password from Autocad VBA macro .dvb files. goo.gl/RZWpmF

Carlos Ramos 2016-10-24 04:31:22 UTC

Thanks a looooot! I had written a vba code of about 2k lines many years ago for AutoCAD R14 (not AutoCAD 2014, but AutoCAD R14 circa 1998). I couldn´t remember the pwd after all this time. Your suggestion worked perfect for me. Thanks again!

Pat 2017-04-12 19:30:25 UTC

AWESOME! Thanks so much - worked like a charm.

Daniel Smith 2017-04-14 05:54:27 UTC

You can also take the help of third party AutoCAD DVB password recovery tool to remove password from protected AutoCAD VBA macro .dvb file. You can download the software from here: http://www.vbapasswordrecovery.net/autocad-dvb/

dayan 2017-06-20 01:08:06 UTC

please how to remove password from protected AutoCAD

S.M.R.Sadeghi 2018-01-08 07:17:13 UTC

Very Very Thanks.

Marko 2018-03-27 05:55:03 UTC

I have locked dwg file. Can you explain me how to get dvb file and all other procedure.

Add comment

Recent comments

Tags