PC Review


Reply
Thread Tools Rate Thread

Accessing the functions inside an add-in?

 
 
Air_Cooled_Nut
Guest
Posts: n/a
 
      3rd Apr 2008
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 With Quote
 
 
 
 
Air_Cooled_Nut
Guest
Posts: n/a
 
      3rd Apr 2008
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_ReturnDataPath", _
"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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to use "standard" Excel functions inside VBA functions Nenad Tosic Microsoft Excel Programming 4 7th May 2010 09:11 PM
use time functions inside if loop saedeepu Microsoft Excel Worksheet Functions 2 17th Sep 2009 12:55 PM
RowCommand: accessing ObjectDataSource from inside gridview inside a repeater? HockeyFan Microsoft ASP .NET 1 4th Jul 2007 06:49 AM
Calculting SUM of cells with IF functions inside =?Utf-8?B?TWloY2E=?= Microsoft Excel Worksheet Functions 1 23rd Sep 2005 07:17 PM
how can use old MFC functions inside a .NET project? gif Microsoft VC .NET 6 19th Jan 2004 03:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:24 PM.