Thread: Creating #codes
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] geofferrington@gmail.com is offline
external usenet poster
 
Posts: 7
Default Creating #codes

I am trying to turn email addresses into #Code strings, in order to
stop bots from harvesting them....

To this end I have created the following UDF but the Excel function
"Code() is not accepted. Placing "Application." in front of the word
code does not work either.


Function Hash(s) As String
strL = Len(s)
For i = 1 To strL
'--Hash = Hash & "&#" & Application.Code(Mid(s, i, 1)) & ";"
'--Hash = Hash & "&#" & Code(Mid(s, i, 1)) & ";"
Hash = Hash & "&#" & Mid(s, i, 1) & ";"
Next i
End Function

Any ideas?

Geoff