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/... ??).

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:

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: 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.

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:

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.

Rollins Duke 2022-05-06 10:47:32 UTC

I have recently used BitRecover VBA Password Remover Wizard to remove AutoCAD VBA project password in bulk. This is an easy-to-use software that is capable to unlock VBA project passwords from AutoCAD as well as Excel, Word, Access, PowerPoint, etc. Know How to Unlock VBA Password from AutoCAD DVB Files –

sonsun 2023-05-04 05:08:35 UTC

Is there any other method to protect vba files rather than password method?

Add comment

Recent comments


ruby on rails 34 ruby 26 rails3 17 rails 15 oracle 11 rspec 9 rspec2 7 jquery 7 ubuntu 5 javascript 5 windows 5 activerecord 3 refactoring 3 geoserver 3 gis 3 arrrrcamp 3 actionmailer 2 oracle spatial 2 tdd 2 postgis 2 routing 2 rvm 2 mongoid 2 csharp 2 thin 2 win32 2 gem 2 rails4 2 git 2 service 2 haml 2 cucumber 2 view testing 2 i18n 1 displaysleep 1 spatial 1 gemsets 1 wubi 1 oracle_enhanced_adapter 1 migrations 1 watchr 1 ci 1 plugins 1 coderetreat 1 ie8 1 ssl 1 oci 1 nested model form 1 wcf 1 11.04 1 jsonp 1 ruby-oci8 1 teamcity 1 engines 1 pgadmin 1 soap 1 content_for 1 word automation 1 plugin 1 capybara 1 xml 1 bootstrap 1 migrate to rails3 1 mvc 1 unity 1 rendering 1 word2007 1 x64 1 limited stock 1 fast tests 1 pl/sql 1 delayed_job 1 pdf 1 test coverage 1 optimization 1 processing 1 borland 1 method_missing 1 cross-browser 1 devise 1 schema_plus 1 mongo 1 mongrel 1 dual boot 1 usability 1 mongrel_service 1 dba 1 mission statement 1 model 1 metadata 1 rcov 1 exceptions 1 image_tag 1 attachments 1 bde 1 css 1 yield 1 ajax 1 generative art 1 rails-assets 1 coordinate systems 1 submodules 1 netzke 1 ora-01031 1 authlogic 1 postgresql 1 shopping cart 1 agile 1 fast_tagger 1 subjective 1 wice_grid 1 generators 1 nvidia 1 mongodb 1 etsyhacks 1 staleobjecterror 1 session 1 jeweler 1 wordpress hacked 1 jasmine 1 heroku 1 rjs 1 life 1 unobtrusive-javascript 1 render_anywhere 1 html5 1 rails31 1 json 1 cocoon 1 mingw32 1 observe_field 1 osx 1 actionwebservice 1 testing 1 debugging 1 strings 1