Thread: Creating #codes
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Creating #codes

Like:

Hash = Hash & "&#" & Asc(Mid(s, i, 1)) & ";"

?????

wrote:

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


--

Dave Peterson