UDF to return as text
On Fri, 11 Dec 2009 13:41:40 -0800 (PST), Fan924 wrote:
This UDF returns a Hex number. I would like it to change the cell
format to text. Thanks,
Public Function DecToHex(DecNumber As Variant) As String
DecToHex = Right("0" & Hex(DecNumber), 2)
End Function
A Function can only return a value. It cannot change the environment.
--ron
|