ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Module Precedence? (https://www.excelbanter.com/excel-programming/378747-module-precedence.html)

sb

Module Precedence?
 
Hi,

I have a number of UDFs that I need to access from multiple spreadsheets so
I thought that I'd put them in an add-in rather than copying them to each
individual spreadsheet.
I started a new workbook, went to the VBE, added a module and copied the
code from an existing workbook. Save the workbook as an xla and then started
a new workbook, Tools/Add-ins and ticked the check box. In A1 I then typed in
one of my functions and it worked fine - so far so good.
I now go back to the workbook that I copied the code from and delete it from
the module. Check cells that refer to the code and I get a NAME error. If I
create a new workbook and type the name of the function it works fine, it
just won't work in my existing workbook. This workbook does have other
modules in it, could that be causing the problem finding my function? Or have
I stuffed something else up?

thanks


(I have also posted this query in the General Section)

Dave Peterson

Module Precedence?
 
Check your other post.

SB wrote:

Hi,

I have a number of UDFs that I need to access from multiple spreadsheets so
I thought that I'd put them in an add-in rather than copying them to each
individual spreadsheet.
I started a new workbook, went to the VBE, added a module and copied the
code from an existing workbook. Save the workbook as an xla and then started
a new workbook, Tools/Add-ins and ticked the check box. In A1 I then typed in
one of my functions and it worked fine - so far so good.
I now go back to the workbook that I copied the code from and delete it from
the module. Check cells that refer to the code and I get a NAME error. If I
create a new workbook and type the name of the function it works fine, it
just won't work in my existing workbook. This workbook does have other
modules in it, could that be causing the problem finding my function? Or have
I stuffed something else up?

thanks

(I have also posted this query in the General Section)


--

Dave Peterson


All times are GMT +1. The time now is 03:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com