LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Link .xls cell formula to .xla function

Excel 2000 xla problem:

Hi,

I would like to encapsulate all code from a .xls file
into an .xla (complementary macro) file. My ultimate goal
is to simplify the maintainability of my code: I do not
want to ask users to update their thousands of .xls files
when I do a tiny change in the code. The .xla file seemed
like a good solution: the user's .xls files would not be
affected if I would modify the code, only the .xla file
would need to be replaced.

Using this technique, subs seem to work fine, but
functions don't. Is there a way to also encapsulate
functions code outside of the .xls files?

This is what I attempted:

1) I created a Code.xla file with a single module that has
this code inside:

Public Function Crap(ByVal psName as String) As String
Crap = "Your name is " & psName
End Function

2) I created a new empty ExcelWorkBook.xls file.

3) I referenced the Code.xla file in Excel's menu
Tools/Complementary Macros...

4) I put the following formula into a cell in
ExcelWorkBook.xls:

=Crap("me")

From all this I get

#Name?

as the cell formula result. Which is strange since
the "Formula Zone" pannel that appears when you click on
the "equal" button from our formula cell seems to
recognize the Crap function parameters...

Pointers anyone? (hehe)

Thanks,
C.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to link a few cell to Calculate Sky[_2_] Excel Worksheet Functions 1 August 4th 09 07:04 PM
Naming a Formula, using Link to Cell containing that Formula Lee4 Excel Discussion (Misc queries) 1 August 25th 08 11:16 PM
Link a cell from another worksheet as a result in a function? LisaLisaKK Excel Worksheet Functions 1 September 7th 06 06:47 PM
EXCEL LINK CELL FORMULA MDL2005 Excel Worksheet Functions 3 March 18th 05 01:49 PM
formula and cell link movements wenrichards Excel Worksheet Functions 2 January 17th 05 09:36 AM


All times are GMT +1. The time now is 12:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"