DownloadsMicrostation-Bentley

Break the password of a VBA macro from Microstation

Visual Basic for Applications is a series of libraries that Microsoft made available, somewhat old-fashioned but very powerful, especially in versions of Office before 2010. Although it continues to exist, many developments are now made in .NET and other environments; even so, for frame-based developments, VBA is quite a practical solution and in the Case of Microstation, quite simple. At least I remember talking about this by showing the Bounded map And something with XFM.

These are some of the problems that have come to me this morning, as I ran at the Virgin's roundabout in a tropical home:

Help: When I run the VBA, I get the message:

“Licensing information for this component not found. “You do not have sufficient rights with this license to use this functionality in the development environment.”

There are a number of ways to get around this problem, including installing a microstation prerequisite package such as those released for XM. The problem here is that, possibly when using a version of Windows 8 or Windows 10, many old-fashioned libraries do not work and surely this VBA was built before 2010.Vba-xvi32-microstatin-excel

A practical output: Installing Visual Basic 2010 Express, this will not load the computer much and will add the OCX controls that possibly an experienced user since the debugger could detect and enter from the command console.

A probable route of Download Visual Basic Express is this.

In case you are wanting to run from Microstation Connect Edition, it is almost certain that the application has to make an adjustment because some library routes changed.

To run a microstation VBA marcro, in the case of V8i and earlier it is done with Utilities / Marcro / Project Manager. In the case of Microstation Connect, you have to choose the Utilities tab of the Ribbon.

As you can see, the macro is executed but if we want to touch the code will show the protection window.

Is it possible to break the password that a VBA has?

Vba-xvi32-microstatin-excel

The password protection functionality of Visual Basic for Applications seeks to generate control and security for developments, so it should not be correct to ask about these things on a website. However, assuming that the solution is because we forgot the password or that the developer technician gave the chikungunya and hung up the mouse, here is a practical solution using a hex editor.

VBA is adopted by the developer companies, so the acronym used within the code to indicate when the password is entered changes from one application to another. For example, to remove the password from an Excel VBA macro normally the acronym is DBP=”password”, for Access the password is DPX=”password”. If we find that string, and change it to something like DBR instead of DBP, or DPR instead of DPX, when saved, the protect key command will no longer be spelled correctly, and the vba will open unprotected.

This, using Hex Editor, in the Edit / Search option, writes the string we are looking for, for example BDP, with the Text string option and keeping Case active active, as shown in the following image.

Macro-vba-password

Using a Hexadecimal editor (Hex Editor), it is likely to open the .mvba microstation extension macro and make that change by following these steps:

1. Download XVI32

This can be downloaded from this direction; In my case I'm downloading the 2.55 version, low compressed in zip, you have to unzip it and run the xvi32.exe file.

Vba-xvi32-microstatino

2. Open the mvba application.

It is recommended, before opening the VBA to make a copy. See that no matter how protected it is, you can see its guts here. Well, the only thing left is to look for that acronym, once found one of the three letters is changed for an X, and it is saved. With this, the VBA is already unprotected.

When closing the application will ask if they save the changes, it is necessary to indicate that yes.

Vba-xvi32-microstatin-excel

Once it has been saved, see that when you open the VBA it no longer asks for a key, so it is likely to assign it a new one. If the user who had forgotten the password is still working in the company, you have to go give him a few bumps on the head or at least force him to pay for the beers on Friday; if he died with the chikungunya, we have another minute of silence.

Vba-xvi32-microstatin-excel

Finding the acronym for Microstation VBA (mvba), seems to be the next puzzle. It is not the same for Excel or Access but with an effort of common sense and patience you can find it.

For the savings that means not being able to know the password, we will give you the acronym chain in exchange for a symbolic collaboration. Of course, there is always a culprit or a winner, that one must be charged XD. For that you have to buy the download with Credit card or Paypal.

Golgi Alvarez

Writer, researcher, specialist in Land Management Models. He has participated in the conceptualization and implementation of models such as: National Property Administration System SINAP in Honduras, Management Model of Joint Municipalities in Honduras, Integrated Cadastre-Registry Management Model in Nicaragua, Territory Administration System SAT in Colombia . Editor of the Geofumadas knowledge blog since 2007 and creator of the AulaGEO Academy that includes more than 100 courses on GIS - CAD - BIM - Digital Twins topics.

Related Articles

2 Comments

  1. regards
    In my case, I don't want to break, delete or destroy, the word vba password, what I want is to let me know or remember the password. Do you know what the mode would be?

Leave a comment

Back to top button