Getting an Excel UDF to Return a Hyperlink
问题 Currently to get a UDF to return a hyperlink I use something like: Public Function HyperActive() As String HyperActive = "http://www.cnn.com" End Function and in a worksheet cell, I use: =HYPERLINK(hyperactive(),"news") to make a nice, "click-able" link. I would like to have the UDF return a "click-able" link directly. I have tried: Public Function HyperActive() As Hyperlink Dim h As Hyperlink h.Address = "http://www.cnn.com" Set HyperActive = h End Function just returns #VALUE! in the cell!