Option Private Module

S

Smallweed

I'm using the Excel 4 REGISTER command to add argument descriptions to my
company's suite of UDFs and function categories to the Function Wizard
(thanks in no small part to Jan Karel Pieterse). To stop duplication of
these UDFs in the "User Defined" category (and 2 entries for each under "All"
category), I can put Option Private Module at the top of each module
containing my UDFs.

This is great but these UDFs have been around for while and other people
here will have coded all sorts of calls to them. What are the ramifications
of my making these modules private? Could there be backward-compatibility
problems with other people's code suddenly falling over? I know most people
use this type of call:
x = Application.Run("addin.xla!UDF",arg1,arg2) but there could be other
types in use.
 
P

Peter T

Yes, adding Option Private could potentially cause problems. One scenario is
if a reference has been set to project procedures in private modules will
not be visible, possibly other scenarios too.

UDF's should continue to work though, as would app.run.

I'm not sure which Excel4-Register method you are using but if you are using
the workaround developed by KeepItCool I don't think you should have any
issues with UDF's appearing duplicated in categories in the function list.
http://www.jkp-ads.com/articles/RegisterUDF01.asp

Regards,
Peter T
 

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