ChemCougar82
New Member
- Joined
- Jul 28, 2005
- Messages
- 9
This is a frequent problem for me. When I save a macro-enabled workbook that contains function procedures into a new file name, when the workbook attempts to use the function procedures, it is looking for the function procedures in the old workbook name, not the new one. Borrowing some language from the HTML world, Excel automatically inserts an "absolute reference" to the old workbook location into the function calls in my worksheets. The only way I currently know to fix this is to manually remove those absolute references. I think there should be a way to tell the workbook that I always want to refer to functions in the current workbook, not in the original workbook -- what I would call a "relative reference".
Here's a hypothetical example of the problem I'm referring to, in case I haven't used some of the correct language to describe the problem. I have an original workbook C:\MyWorkbook.xlsm. In that workbook, there is a function procedure called "MyFunction()". In my workbook, the function calls look like this:
=MyFunction()
I save the workbook with that function in it and email it to a friend. He save's the file as "MyFriendsWorkbook.xlsm". After he saves the file, the function calls don't work. When he looks at them, this is what he sees:
='C:\MyWorkbook.xlsm'!MyFunction()
The function procedure is still in the copy of the workbook that my friend has, but none of the function calls will work until he manually deletes all the absolute reference strings that were added by Excel. Who knows how to stop this from happening so that there is no manual cleanup needed?
Here's a hypothetical example of the problem I'm referring to, in case I haven't used some of the correct language to describe the problem. I have an original workbook C:\MyWorkbook.xlsm. In that workbook, there is a function procedure called "MyFunction()". In my workbook, the function calls look like this:
=MyFunction()
I save the workbook with that function in it and email it to a friend. He save's the file as "MyFriendsWorkbook.xlsm". After he saves the file, the function calls don't work. When he looks at them, this is what he sees:
='C:\MyWorkbook.xlsm'!MyFunction()
The function procedure is still in the copy of the workbook that my friend has, but none of the function calls will work until he manually deletes all the absolute reference strings that were added by Excel. Who knows how to stop this from happening so that there is no manual cleanup needed?