Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can I use functions from addIns in VBA code? I have custom functions as well
as some from Excel's addIns that I would like to use in a module. Is this possible? (Also I am new to programming and I am trying to learn VBA from the few examples in John Walkenbach's Excel 2003 Bible. Would his Excel VBA book be a good start?) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way is to add a reference to that addin to your workbook's project.
Make sure that the project name isn't VBAProject--make it a nice unique name. Select your addin's project in the VBE, hit F4 to see the properties window and change the (name) property. Then select your workbook's project that will use that addin and tools|references and check that addin's project. Then you can use your functions just like they're built into VBA. You could also use something like: dim res as variant res = Application.Run("youraddinname.xla!yourfunction", parm1, parm2, parm3) With no references. Rbp9ad wrote: Can I use functions from addIns in VBA code? I have custom functions as well as some from Excel's addIns that I would like to use in a module. Is this possible? (Also I am new to programming and I am trying to learn VBA from the few examples in John Walkenbach's Excel 2003 Bible. Would his Excel VBA book be a good start?) -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes it's a great book.
yes you can use functions in code helpWorksheetfunction. see list of supported functions and note that WorksheetFunction.functionname(stuffhere) is the typical syntax Syntax is the hardest component of coding. "Rbp9ad" wrote: Can I use functions from addIns in VBA code? I have custom functions as well as some from Excel's addIns that I would like to use in a module. Is this possible? (Also I am new to programming and I am trying to learn VBA from the few examples in John Walkenbach's Excel 2003 Bible. Would his Excel VBA book be a good start?) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wrote the function to return a vendor number from an account number.
Option Explicit Function Vendor(VR As Variant) As String Application.Volatile True Dim Acct As Variant Acct = Strings.Left(RRLookup(VR, 11), 12) Select Case Acct Case Is = "236SPDTI DTI", "207SPDI3 DI3", "207SPDTI DTI" Vendor = "36359" Case Is = "202SPDTI DTI" Vendor = "2810" Case Is = "240SPLIG LIG" Vendor = "2814" Case Else Vendor = "" End Select End Function The account number is looked up from a spreadsheet that is entered manually. I was wondering if there was a way to make the function less sensitive to typos and differing input (Additional spaces etc.). "Vacation's Over" wrote in message ... Yes it's a great book. yes you can use functions in code helpWorksheetfunction. see list of supported functions and note that WorksheetFunction.functionname(stuffhere) is the typical syntax Syntax is the hardest component of coding. "Rbp9ad" wrote: Can I use functions from addIns in VBA code? I have custom functions as well as some from Excel's addIns that I would like to use in a module. Is this possible? (Also I am new to programming and I am trying to learn VBA from the few examples in John Walkenbach's Excel 2003 Bible. Would his Excel VBA book be a good start?) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Collection custom functions as asn addin | Excel Discussion (Misc queries) | |||
Custom Functions saved as addin | Excel Worksheet Functions | |||
Addin loads but functions don't work | Excel Programming | |||
addIn functions in automation | Excel Programming | |||
Using Functions from an Excel Addin | Excel Programming |