This may be a simple question, but the answer is what every vba (excel) programmer should know:
There is a hierarchy that is observed when a function name collides.
Here is the priority structure:
- 1st priority set for excel functions by default (e.g. Sum, Count, ...)
- 2nd priority assigned to dll reference functions. (later ...)
- Third priority provided by add-ins (e.g. Days360 - in case of Excel 2003)
- 4th priority granted to module functions or custom user-defined UDF.
Also remember that in the second case, priority: If two or more references have the same function name (for example, if we refer to the ADO library and the DAO library together, there may be some collision of names), then the priority can be set manually by you requirement. In the Excel VBA IDE, go to Tools β Links β Select any library and in the right part of the window press βPriorityβ up / down to increase or decrease the priority of the function library.
Hope this helps everyone :)
Roshan Hyder Rymbai
source share