Addin conflicting with Workbook Module

K

Kigol

Backround: I had a workbook module containing code which I migrated to
an addin. At first I did not change the procedure names in the addin
to differ from those in the workbook module. Need less to say the
addin continued to run the old procedures until I changed the
procedure names.

Problem: After changing the names of the procedures it cannot find the
code in the addin. However this only occurs in the workbook with the
original code. It works fine in all other workbooks.

Suggestions?
 
D

Dave Peterson

Are these UDFs that you use in a cell in a worksheet?

Saved from a previous post for the same kind of problem--the UDF was in a
workbook, then moved to an Addin.

After I moved the code from one workbook's project to the other and saved both
files (one as an addin), I did this in the "regular" workbook (.xls) (with the
..xla still open).

Insert|Name|define
myFunc
(refer to any cell)
Add

Then I deleted that name.
insert|name|define
myfunc
delete

Then I did edit|replace
what: = (equal sign)
with: = (equal sign)
replace all

Excel was smart enough to reevaluate this function from the xla.
 
G

gimme_this_gimme_that

Assuming your talking VBA here ....

You may as well change the name of one of the Subs to something else.

But if you want to make it so that other users of your AddIn Subs
don't run into the same problem, or if you're looking for a clean
solution to this problem in general, put your Addin Subs into a class
module.

If you need an example let me know.
 
K

Kigol

Assuming your talking VBA here ....

You may as well change the name of one of the Subs to something else.

But if you want to make it so that other users of your AddIn Subs
don't run into the same problem, or if you're looking for a clean
solution to this problem in general, put your Addin Subs into a class
module.

If you need an example let me know.

Well sure enough the simplist action resolved it...restarting excel
(which I swore I did prior to posting). Anyway, it works now but thank
you for your help. Must have just been holding the reference in memory
although I couldn't imagine why. Cheers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top