Ver versión en español    
 
Home
10 Reasons to use MZ-Tools
MZ-Tools 6.0 for VS.NET
Editions
Features
Online Documentation
MZ-Tools SDK
Download
Purchase
Version History (RSS)  
FAQ & Support
MZ-Tools 3.0 for VB6 & VBA
Features
Online Documentation
Download (freeware)
Donations (Paypal)
Version History (RSS)  
FAQ & Support
User Reviews
Community Place
Contact  
For Add-In Developers
About
   
 
User Testimonials

I'm an avid supporter of MZ-Tools. It's a product I couldn't do without and your level of support is outstanding.

Jan Hyde (Visual Basic MVP)

You will soon wonder how you ever lived without it.

Andy Maggs

More user reviews
 
FAQ & Support of MZ-Tools 3.0 for Visual Basic 6.0, 5.0 and VBA

General Questions
Common Problems

General Questions


Will there be a version 4.0 of MZ-Tools for VB6/VB5/VBA?

No, there are no plans to create new versions with new features or enhancements for VB6/VB5/VBA but MZ-Tools 3.0 will be supported through builds with bug fixes.

   Top

Will the source code of version 3.0 be released (as open-source or sold, for example)?

No, the source code will not be made available as open-source and cannot be bought either.

If you want a fix for a bug, report it and likely it will be fixed in the next monthly build.

If you want the source code for learning purposes, the best way to learn is to develop your own add-in. You can post specific questions in the Microsoft newsgroups and likely you will get the answers.

   Top

I need a feature that is not provided by MZ-Tools (such as a code indenter)

You can take a look at end of the Download page to see if other add-ins can provide the missing feature.

   Top

Is there a MZ-Tools version for Office 97?

No, Office 97 does not support COM-Addins.

   Top

How do I apply some feature such as Line Numbering or Error Handlers to a whole file, project or project group?

The current version does not support adding error handlers to a whole file, project or project group, because I think that error handling is so important that it should be an integral part of the procedure logic (not an afterthought) and therefore it should be done carefully, one procedure each time, and not in a massive or blind fashion.

Other features such as Line Numbering or Reviews can be applied to a whole file, project or project group as it is explained in the help file for each feature, but here is the answer:

  • To apply the feature to a whole file, use the context menu of that file in the Project Explorer.
  • To apply the feature to a whole project, use the context menu of that project in the Project Explorer.
  • To apply the feature to a whole project group, use the proper submenu of the Tools | MZ-Tools main menu.
   Top

Where are the MZ-Tools settings stored, so they may be backed up and restored?

You may want to backup the MZ-Tools settings for safety or you may want to share the settings between two computers (at home and at the office, for example). The MZ-Tools settings are stored in the following locations:

  • The settings that you set in the Options window are stored in the .ini file that is in the following folder:

    - Windows Vista: "C:\Users\<user>\AppData\Roaming\MZTools Software\MZTools3"
    - Windows 2000/XP: "C:\Documents and Settings\<user>\Application Data\MZTools Software\MZTools3"

    Note: in non-English Windows 2000/XP operating systems, the "Application Data" folder is localized (for example, in Spanish is "Datos de programa") although the "Application Data" folder may exist too because some buggy software creates it without taking into account that it should use a localized name.
  • Some personal settings such as your favorite procedures, favorite projects, windows sizes and other volatile information are stored in the same registry entry used by Visual Basic to locate add-ins, that is:

    - For Visual Basic 6.0: HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0\AddIns\MZTools3.Connect
    - For VBA: HKEY_CURRENT_USER\Software\Microsoft\VBA\VBE\6.0\AddIns\MZTools3VBA.Connect
    - For Visual Basic 5.0: HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\5.0\AddIns\MZTools3VB5.Connect

    Note: Visual Basic 5.0 does not use the Windows registry to locate add-ins (it uses the vbaddin.ini file), but for consistency MZ-Tools uses that Windows registry entry.

    To backup registry settings, use the RegEdit.exe tool, select the desired registry node and click the File | Export... menu. The settings will be exported to a .reg file that you can restore later just by double-clicking on it or using the RegEdit.exe tool again.
   Top

Some features of MZ-Tools for Visual Basic are not included in MZ-Tools for VBA. Why?

This is explained in the "Using MZ-Tools" topic of the help file.

   Top

When I use the "Copy Control(s) With Code" feature with Access I get the error "There is no active designer". Why?

That feature works with forms of Visual Basic, or VBA userforms of Word or Excel ("Insert", "UserForm" menu). On the one hand Access lacks VBA UserForms and on the other hand an add-in for the VBA editor of Access can not access the forms or reports of Access, because they belong to Access itself and MZ-Tools is not an add-in for Access but for its VBA editor.

   Top

When I add a button of MZ-Tools to another toolbar, the button does not work after restarting the IDE. Why?

The VB or VBA IDEs don't support adding buttons from an add-in to another toolbar, that mechanism only works with built-in buttons of the IDE. When the add-in is reloaded, it is no longer associated with buttons that it does not create at that moment. Visual Studio .NET introduced the concept of (permanent) commands, from which you create buttons, and that mechanism works perfectly in that IDE, but not in the old VB / VBA IDEs.

   Top


Common Problems


I get error 0x80004005 installing MZ-Tools

When you install a VB6/VBA add-in dll, two things happen:

  • The DLL is registered as ActiveX (COM) component on the machine, using the HKEY_LOCAL_MACHINE registry entry. That means that to install MZ-Tools you need to be a member of the "Administrators" group.
  • The DLL is registered as add-in for some host, such as VB6 or the VBA editor, using the HKEY_CURRENT_USER registry entry. That means that MZ-Tools is installed only for the logged-in user, not for all users.

If you receive the error code 0x80004005 when installing MZ-Tools, it can be caused by these known reasons:

  • You are not an administrator of your machine. For example, a user member of the "Users" group will not be able to install MZ-Tools, while a user member of the "Administrators" group will succeed.
  • Your installation of VB5 / VB6 / VBA / Office is corrupted (this is a very rare case). According to reports of users, reinstalling Visual Basic (or simply the last service pack that you were using) or Office should fix the problem.

This problem should not happen with modern versions of MZ-Tools 3.0 that are supplied with a setup (which checks for administrator rights when run). Older versions of MZ-Tools 3.0 were supplied with only a DLL that you had to register with regsvr32.exe and could cause this error if running without admin rights.

   Top

I can't install MZ-Tools without admin rights

When you install a VB6/VBA add-in dll, two things happen:

  • The DLL is registered as ActiveX (COM) component on the machine, using the HKEY_LOCAL_MACHINE registry entry. That means that to install MZ-Tools you need to be a member of the "Administrators" group.
  • The DLL is registered as add-in for some host, such as VB6 or the VBA editor, using the HKEY_CURRENT_USER registry entry. That means that MZ-Tools is installed only for the logged-in user, not for all users.

If you want to install MZ-Tools for a non-admin user, you have two options:

  • Add the non-admin user to the "Administrators" group, log-on with that user, install MZ-Tools and remove that user from the "Administrators" group.
  • Install MZ-Tools using an admin user (that will register the dll as COM component on the machine) and using regedit.exe export (File, Export... menu) the following registry key to a .reg file:

    - For Visual Basic 6.0: HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0\AddIns\MZTools3.Connect
    - For VBA: HKEY_CURRENT_USER\Software\Microsoft\VBA\VBE\6.0\AddIns\MZTools3VBA.Connect

    Then, log-on using the non-admin user and import or merge the .reg file into the Windows registry. That will register the dll as add-in for the non-admin user.
   Top

I don't see MZ-Tools after installing it

MZ-Tools is an add-in (add-on, or plug-in) for an Integrated Development Environment (IDE) such as Visual Basic 6.0 or the VBA editor of an Office application. It is not a standalone executable that you run from the "Start", "Programs" menu. The MZ-Tools setup configures MZ-Tools to load automatically in the IDE. You can check that MZ-Tools is installed in the IDE going to the "Add-Ins", "Add-in Manager" window. When MZ-Tools is loaded, it creates a new toolbar, a MZ-Tools menu under the main Tools menu, and some context menus in the Project Explorer.

If MZ-Tools is not loaded after installing it successfully, it can be due to the following reasons:

  • The user who installed MZ-Tools and the user who is using MZ-Tools are not the same. See the previous sections about installation.
  • You have installed the wrong version of MZ-Tools. For example, you have downloaded and installed MZ-Tools 3.0 for VB6 (which uses the mztools3.dll file) while you are expecting it to appear in the VBA editor, which needs MZ-Tools 3.0 for VBA (mztools3vba.dll file).
   Top

I get an error registering hotkeys when MZ-Tools is loaded

You get a message "Error registering the following hot keys...". MZ-Tools uses hot keys to implement shortcuts since they are lacking in the Visual Basic Extensibility Model. If a hot key has been registered by other program (such as ICQ), when MZ-Tools is loaded and tries to register that hot key you get that error. To solve this problem, go to the Options window, Shortcuts tab, and choose hotkeys not used by other programs or add-ins.

   Top

I get an error with the clipboard when MZ-Tools is loaded

Due to the method implemented by Microsoft to use custom images in buttons, MZ-Tools must use the clipboard during the load. If other application (such as a clipboard utility or a graphics application) is using or locking the clipboard, you can get a friendly error reporting this issue after three failed attempts. To solve this problem, unload the application that is causing the problem. If there is no application locking the clipboard, try downloading and installing a version of MZ-Tools 3.0 newer than September 2008 which implements an enhanced workaround to avoid this problem.

   Top

I get a crash unloading MZ-Tools or the Visual Basic / VBA IDEs

A crash can occur if it is loaded another add-in that also does window subclassing with the main window of the VB IDE (just as MZ-Tools does). In this case, add-ins should be unloaded in reverse order to properly restore the subclassed window procedures. Unfortunately, VB unloads add-ins in the same order that they were loaded, not in reverse order. So, if you have two add-ins that are loaded on startup and both do subclassing, you will get a crash when unloading VB. To solve this issue, you can use any of these ways:

  • Load and unload one of them manually in the proper order.
  • If you are using version 3.00.1006 or higher, you can add by hand the following line to the .ini file in the OPTIONS section:

[OPTIONS]
...
SubclassIDE=0

That line causes MZ-Tools not subclassing the VB IDE. The side effect is that MZ-Tools shortcuts will not work, but you can use MZ-Tools through menus or buttons.

  • Stop using both add-ins at the same time.
   Top

The Visual Basic IDE menus have been corrupted

This can happen in two scenarios:

Anyway, to solve this problem:

  • Unload all add-ins.
  • Right-click on a toolbar and select the Customize... menu.
  • For each toolbar click the Reset... button (6 times in total).
  • Reload the add-ins.
   Top

The shortcut created for a built-in VB feature (such as Comment Block) does not work

If shortcuts for non built-in VB features (such as Add Procedure Header) work fine then it is not a problem with the shortcuts. Likely is because your Edit toolbar has been customized or is corrupted and does not have the button for the built-in VB feature, which MZ-Tools tries to use when invoking the shortcut. In this case, MZ-Tools fails silently. To solve this problem follow the procedure of the previous section to reset the toolbars and try again.

   Top

The Make Project Group menu of the Visual Basic IDE is disabled

This can happen from time to time but it is not reproducible at will. MZ-Tools sets an event handler to it to capture click events for the reviews before making the executable, and maybe this causes some kind of interference.

To solve this problem follow the procedure of the previous section to restore the menu state and download the build 3.00.1003 or higher. From this build MZ-Tools does not trap events of the Make Project Group menu so the problem should disappear. Unfortunately this means that the Reviews Before Making The Executable will not be executed when you use the Make Project Group menu, only when you use the Make Project menu.

   Top

There are problems with the images of the buttons of the MZ-Tools toolbar

Some known problems are the following:

  • Using VB5 the toolbar buttons of MZ-Tools disappear or appear with a dark background at debug-time or run-time.

    This is a problem of all add-ins, not only of this one. It is due to a bug in the VB5/VB6 IDEs:

    • Using 16-bit of color depth, when you run a project the toolbar buttons appear with a dark background.
    • Using 32-bit of color depth, when you run a project the toolbar buttons disappear.
    • Using 24-bit of color depth it works as expected.

    This problem also happens in the VB6 IDE, but due to a feature of the VB6 IDE not present in the VB5 IDE, MZ-Tools can hide the toolbar at debug-time or run-time.

    To solve this problem using VB5, use the 24-bit color depth.

  • Since VB uses the Windows clipboard to set a custom image on a toolbar button, MZ-Tools needs to copy its button images to the clipboard. If some other add-in, application or utility is using or locking the clipboard at the same time, MZ-Tools will fail to copy the image and the previously stored image in the clipboard (whichever it is) will be used instead. So, if you can reproduce this problem consistently after restarting VB or rebooting the computer, try to unload all other add-ins or to close other applications or utilities until you find which one is locking the clipboard.
   Top

Any problem not addressed here? Don't hesitate to ask.