Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Accessing the functions inside an add-in?

I've created an add-in. I would like to make the functions in it available
to other VBA programmers. I figure the programmer would need to Reference
the add-in. What can I do to my add-in code that would allow its functions
to be accessed by outside modules? My add-in is not contained in a Class
module...does that matter?
--

Toby Erkson
http://excel.icbm.org/
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Accessing the functions inside an add-in?

Nevermind, I figured it out.
--- Code Start ---
Sub test()
Dim dummy As String 'My function does return a value

dummy = Application.Run("SAP_Data_Assistant.SAP_ReturnData Path", _
"C:\Excel\OTS\SAP OPOS Output File.xls", "",
Sheets("Where").Range("A2").Value, False)

Sheets(1).Range("A1").Value = dummy
End Sub
--- Code End ---
My add-in is named "SAP_Data_Assistant.xla" and the function I want to use
is "SAP_ReturnDataPath" (it has a parameter list but that's not important
here).

Basically it's:
Application.Run ("add-in name.function"[, paramater1][,parameter2][,etc.])

For simple functions:
Application.Run "add-in name.function"

Suggestions for a better way are welcomed :-)
--

Toby Erkson
http://excel.icbm.org/


"Air_Cooled_Nut" wrote:

I've created an add-in. I would like to make the functions in it available
to other VBA programmers. I figure the programmer would need to Reference
the add-in. What can I do to my add-in code that would allow its functions
to be accessed by outside modules? My add-in is not contained in a Class
module...does that matter?
--

Toby Erkson
http://excel.icbm.org/

Reply
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
Accessing cube functions (ie cubevalue) from VBA Jose B. Excel Worksheet Functions 0 September 27th 07 08:02 AM
Accessing cube functions (ie cubevalue) from VBA Jose B. Excel Programming 0 September 27th 07 08:02 AM
Accessing Analysis Toolpak functions Conan Kelly Excel Programming 4 December 1st 06 09:46 PM
Calculting SUM of cells with IF functions inside Mihca Excel Worksheet Functions 1 September 23rd 05 07:17 PM
VBA Functions accessing value from worksheet sachinshah Excel Programming 1 September 15th 03 04:07 PM


All times are GMT +1. The time now is 03:19 AM.

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

About Us

"It's about Microsoft Excel"