Office 64-bit does not support 32-bit COM (ActiveX) add-ins, only 64-bit COM
add-ins, and MZ-Tools 3.0 is built with Visual Basic 6.0, which can only generate
32-bit components. Office 64-bit will be supported in the next major version of 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 want to install MZ-Tools 3.0 for VBA for a non-admin user, you have two approaches:
- Add the non-admin user to the "Administrators" group, log-on with that
user, install MZ-Tools and remove that user from the "Administrators"
- Make the admin user to install MZ-Tools (this step will register the dll as COM component on the machine for all users).
With your non-admin user, search the "Windows PowerShell ISE" script editor of your Windows operating system and open it. Then, execute the following statements (this step will register the dll as add-in for the non-admin user):
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
New-Item -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns\MZTools3VBA.Connect' -Force
New-ItemProperty -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns\MZTools3VBA.Connect' -Name Description -PropertyType String -Value 'MZ-Tools 3.0 VBA'
New-ItemProperty -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns\MZTools3VBA.Connect' -Name FriendlyName -PropertyType String -Value 'MZ-Tools 3.0 VBA'
New-ItemProperty -Path 'HKCU:\Software\Microsoft\VBA\VBE\6.0\AddIns\MZTools3VBA.Connect' -Name LoadBehavior -PropertyType DWord -Value 3
If you "don't see" MZ-Tools after installing it successfully, it can be due to the following reasons:
- MZ-Tools is not a standalone executable that you run from the "Start", "Programs" menu. MZ-Tools is an add-in (add-on, or plug-in) for an Integrated Development Environment (IDE)
such as Visual Basic 6.0, Visual Basic 5.0 or the VBA editor of an Office application.
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 and a
MZ-Tools menu under the main Tools menu.
- The user who installed MZ-Tools and the user who is using MZ-Tools are not the same. See the explanations
and workarounds above.
- 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
- You have installed MZ-Tools 3.0 for VBA and you expect to see it in an Office
application, such as Access. However, MZ-Tools 3.0 for VBA is an add-in for the
VBA editor of an Office application, not an add-in for an Office application.
So, to see it, you have to open the VBA Editor (Alt+F11).
- You have installed MZ-Tools 3.0 for VBA and you are using the VBA Editor of
Office 2010 64-bit, which is not supported (only 32-bit versions
The MZ-Tools settings are stored in the following locations:
- The settings that you set in the Options window are stored in .ini files in the locations explained in the section Customizing MZ-Tools of the help file or online documentation.
- 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
- 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
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.
Due to the method implemented by Microsoft to use custom images in buttons of add-ins,
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,
unload it. This problem can happen also with remote desktop utilities such as Remote
Desktop, Terminal Server, etc.
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,
download version 3.00.1006 or higher, and add by hand the following
line to the .ini file (see the FAQ entry above about settings locations) in the OPTIONS section:
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.
The current version does not support adding error handlers to a whole file,
project or project group, because 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 using the context menus of the project explorer rather
than the main menu or toolbar.
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.
each toolbar click the Reset... button (6 times in total).
- Reload the add-ins.
Any problem not addressed here? Don't hesitate to ask.