' >>305
' こんな関数作って適宜呼べばいいっしょ。
' 接頭辞、接尾辞はお好みで
Function hexStr(str As String) As String
hexStr = "#" ' 接頭辞
For ic = 1 To Len(str)
hexStr = hexStr & Hex(Asc(Mid(str, ic)))
Next
' hexStr = hexStr & "h" ' 接尾辞
End Function
' おまけ:セルの値を変換するマクロ
Sub Macro1()
ActiveCell.Value = hexStr(ActiveCell.Value)
End Sub