LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Bill Martin -- (Remove NOSPAM from address)
 
Posts: n/a
Default Custom Function Call

I have a library XLA file where I keep custom functions I've written and use in
multiple spreadsheets. The XLA file resides in my XLStart subdirectory and all
works as I would expect it to. I can call the functions from any spreadsheet cell.

My current problem arises in that I'd like to call one of the functions from
within a VBA macro. Somehow I'm unable to figure that out. If I try to call it
normally:

X = MyFunction(Y)

I get a compile error "Sub or Function not defined". So then I tried:

X = Application.WorksheetFunction.MyFunction(Y)

and get an error "Object doesn't support this property or method". Various
other attempts to point VBA to find the custom function all fail.

What's the key? Thanks.

Bill
 
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
Need to reference existing functions in a custom function: possibl dofnup Excel Worksheet Functions 5 August 6th 05 11:42 AM
undefined function error when creating xls pivot from mdb qry andrew Excel Worksheet Functions 0 July 29th 05 07:26 PM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
Force refresh of custom functions donesquire Excel Worksheet Functions 5 May 11th 05 07:36 PM
How to call a function from another workbook Joe Excel Discussion (Misc queries) 4 November 26th 04 03:49 PM


All times are GMT +1. The time now is 12:58 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"