XPathOnUrl inside and out of UDF

I’m using XPathOnUrl inside a UDF by calling it this way:

pReturn = Application.Run("XPathOnUrl", pURL, pXpath)

This works fine, however was wondering if there’s a method to call it more directly, like through adding a reference in the VBAProject?

With another issue, I was wondering what the method would be to call XPathOnURL with the results of a function. Like this:

XPathOnUrl(uFunc(“parameter text”))

The function would return something like – “ ‘URL Text’ , ‘///div//h1’ ”

Thanks

You'll need to turn on "RunAsyncUdfsSynchronously".

Read more here: