Forum Discussion

scambias's avatar
scambias
Contributor
6 years ago

how to check whether a vbscript function exists from another unit

HI all,

 

I know (and have been using a lot) that the method GetRef is useful within a script unit to see whether a function exists or not:

Dim proc: Set proc = GetRef(procName)
FunctionExists = (Not proc Is Nothing)

 

If the procName is inside that unit, this way works fine.

How can I use this (or something else) if I want to know whether a function/sub inside another unit exists or not?

 

Thank you all in advance!

Silvio