MVBA password

Hi

My question is:

Is possible to programatically change mvba password, or broke this password to make mvba unable to open?

  • MicroStation VBA is Bentley Systems' implementation of the Microsoft VBA Toolkit.  Generic components of MVBA are the same as any other VBA.  The password protection in VBA is weak.  Search the web to find articles about it.

     
    Regards, Jon Summers
    LA Solutions

  • There is a better way to protect my vba against viewing?

  • Code in a VBA project is visible, unless the VBA module is password-protected.  Even when the module is protected, VBA's password implementation is notoriously easy to bypass.

    There are ways to make your source code less accessible.  If you want to stay with the VB-family, then you can create a DLL.  A DLL is compiled binary code that is difficult to reverse-engineer.

    • You can create a DLL using Visual Basic (VB6) and call that DLL from your VBA code.  The advantage of this combination is that those languages share much in common.  A disadvantage is that Microsoft stopped supporting VB6 several years ago.  The COM mechanism used to define your interface is implemented identically
    • You can create a DLL using VB.NET and call that DLL from your VBA code.  You can create a COM DLL using .NET.  You can use VB.NET, C#, or any .NET language.  Keep in mind that VB.NET and VBA don't have much in common except the letters 'VB'
    • You can write an application using MDL or the MicroStationAPI.  This approach creates a compiled binary plug-in that is hard to reverse engineer

     
    Regards, Jon Summers
    LA Solutions

  • Unknown said:
    You can create a DLL using VB.NET and call that DLL from your VBA code.  You can create a COM DLL using .NET.  You can use VB.NET, C#, or any .NET language.  Keep in mind that VB.NET and VBA don't have much in common except the letters 'VB'

    In addition to this, I would suggest obfuscating the assembly after compile. To crack unprotected .NET assembly is a child play as well as use VBA password cracker tool. The best protection against disassembling is VB6 DLL, because it is compiled to native code and also 'obfuscated' by VB's complicated compile process and COM environment. But still, there are specialised decompilers for VB, so if they know, that DLL is VB made, they can decompile it without loss of program's logic.

    So, as the good practice is to program the main part in native code and make its logic little confusing :-) To protect your code, I would suggest to compile working code as a native C/C++ DLL and use Declare statement (platform invoke) to call those methods from VBA. Then you can keep your ordinary VBA code password unprotected.

    Dan