I was fooling around writing some code tonight, and realized that I hadn't set up my custom error handler text in MZTools. I've had MZTools on here since I last re-formatted my laptop back in September, and use it all the time, but I never bothered to go in and tweak my own settings. Tonight I was working on a larger project, and wanted some customized error handlers, procedure headers and the like. I jumped into the settings, set it up the way I wanted, and clicked the OK button to save it... and Boom! An error popped up:
Now, I am using the 64 bit edition of Vista on this machine, which is why it's giving "C:\Program Files (x86)\MZTools3VBA\MZTools3VBA.ini" as the path. I took a second to browse through my machine, and discovered that the path does exist. So of the "Path/File access error", that pretty much meant that something was gumming up the access to the file itself.
Basically, this is a permissions issue. I'm not sure if it is the same on the 32 bit version of Vista, but I'd bet it is. Vista is a *little* more security conscious that XP, but what was funny to me about this is that I am an administrator on my machine. Regardless, I decided to take a look at the file permissions. To do this:
- Right click the file
- Choose Properties
- Click the Security tab
Now, on my machine there are 3 account classes listed in the box:
When I click on SYSTEM or Administrators, I can see that they have full permissions to modify this file, as shown below:
But look at the settings for Users:
Fortunately, this is relatively easy to toggle.
- Click on the Edit button (and say yes to the Vista warning).
- Click on Users
- Check the Allow box for Full Control
At this point, as shown below, all the checkboxes under "Allow" will be checked. (Except for "Special Permissions" which doesn't appear on screen at the moment.)
Click Apply, then OK, then OK again to get out of the permissions screen.
And that's it. You'll now be able to save your customizations to MZTools.
To be clear, this issue doesn't actually have anything to do with MZTools, but rather is a permissions issue with Windows Vista. What really makes me shake my head, though, is that my account is an administrator account. I should not need to do this.
At any rate... I'm not sure if you can set permissions on files during installation, as I've never deployed a full program of my own. (I'm guessing that it is possible, and expect that someone will confirm that for me shortly. )
To be very clear, the rest of the functionality of MZTools3 works flawlessly. It's only the ability to customize your settings that runs into trouble. Given that it was written long before Vista came on board, I think it's pretty impressive that this is the only change you need to pull off to keep it fully functional.
Oh, and if you do any programming in Office and you're not using MZTools yet, you should be. It's a free download that you can get right here (you want the MZ-Tools 3.0 for VB6, VB5 and VBA.) It adds a load of useful functionality, and works in Excel 97-2007, and on Windows XP and Vista.