Hi.
I'm trying to write a function that I can use to access information from an online database. I want to be able to write a formula in excel that retrieves company names from registration numbers.
Ie. "=regnumber(1234567890)" and return the name.

When written as a sub the code runs flawlessly,; however, when rewriting it as a function, it cannot read in from the webpage.

Can anyone help me?