View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Michael R Middleton Michael R Middleton is offline
external usenet poster
 
Posts: 18
Default User Defined Addin - Urgent Please Help!

Kirit Patel -

I have a addin that i have created using Excel 2000. Within this addin,

there is a user defined function, it returns a value. Let us assume the
addin is in C:\MyAddin. I then open this addin. From a blank spreadsheet,
i call the user defined funtion (Insert Function). I then save this
spreadsheet in another directory c:\MyReport. If i shut the report down and
re-open is from c:\MyReport, i get prompted to re-establish links. How can
i avoid this problem. It only seems to work if the my custom addin and
report reside in the same directory. <

I don't think there's any way to avoid this problem (unless maybe if your
function is a DLL instead of VBA). What you're seeing is standard behavior
for an add-in user defined function. Look at the cell containing your
function (after you open the workbook without the add-in open), and you'll
see that Excel saves the specific path to where the add-in resided when you
entered the function. I usually advise my users to open such a workbook by
answering No for re-establishing links and then use Edit | Links to
explicitly change the source to the open add-in.

- Mike Middleton, www.usfca.edu/~middleton