UDF Returns String Value to Cell. Can I "attach" a hyperlink to it?

  • Hi Again,


    So just wondering if you can add hyperlink properties to a UDF return?


    Example:


    Code
    Function GetWebsite(SearchTerm1 as String) as String
    
    
    GetWebsite = SearchTerm1
    
    
    End Function


    I realize this code does nothing, just a simple example. But lets say that SearchTerm1 is equal to "EXCEL". My UDF will return "EXCEL" to the worksheet, but can I set it so that this is hyperlinked to a website? (i.e. www.microsoft.com/excel etc.?)


    Thanks!

  • Re: UDF Returns String Value to Cell. Can I "attach" a hyperlink to it?


    Because I want to be able to set the hyperlink value within my udf, and I want the result of my UDF to show a value (SearchTerm1 for example) but with the hyperlink added.


    I'm not sure if I'm explaining this properly...

  • Re: UDF Returns String Value to Cell. Can I "attach" a hyperlink to it?


    If you want to create a hyperlink programatically with a UDF I'm afraid you can't.

    Boo!:yikes:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!