Discussion Locked

Excel changes drive reference to addin

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an Excel workbook that has push buttons that call macros contained in a home grown xla. There is no initial reference to a drive letter. They work great as long as the workbook isn't copied to another drive letter. Then for some reasonthe drive letter gets appended to the name of the macro being called and the next time it is used it can't find the .xla and returns an error. This is really annoying as these files get copied alot. It doesn't happen if you pull the workbook up using Excel and then save the file to the new drive. Apparently the drive references that are appended are then correct. But if you copy it any other way you have a problem.

Any help would be greatly appreciated.

Allan

5 replies

by dklippert

You might want to hard code the references. There are some discussions about this try typing one of the following in the address box of Internet Explorer.
MSKB Q75483
or
MSKB Q142121
or
MSKB Q136314

by soupman

Already looked there - thanks anyway!
I finally decided to pull the contents of the .xla into the template to resolve the problem.

by sankulpune

Hello Allan,

Try assigning the full path of .xla in the button code.

What probably is happening is that the initial worksheet and the .xla are in the same directory. But as soon as you change the worksheet, the .xla is not in the same directory. Since you may have not specified the full path of .xla in the button code, it searches it in the current directory that contains the worksheet.

This may the cause of the error.

SanganakSakha,
Simple And Effective Solutions To Small Problems, No QuickFixes.

by soupman

I did have the full path, but Excel will change the drive letter reference when you move it around.

I finally decided to pull the contents of the .xla into the template to resolve the problem.

Thanks anyway!

This discussion is closed to new replies.