>>>You could just use Asc() or AscW() to convert each character of text
>>>into a number, and then use your existing routine on these numbers.
[quoted text clipped - 19 lines]
>to return a Long containing an integer between 0 and 65535, which fits
>into 16 binary digits.
Thanks for the info John. I'll have to get my head around that later.
Ideally, I wanted to translate text into binary in the sense that it would
produce something like a blob, that is, return a non-text type of value.
I don't know if that's even possible with VBA.
John Nurick - 17 Dec 2005 13:28 GMT
>Thanks for the info John. I'll have to get my head around that later.
>Ideally, I wanted to translate text into binary in the sense that it would
>produce something like a blob, that is, return a non-text type of value.
>I don't know if that's even possible with VBA.
I took your mention of "binary" to mean converting (say) 9 to 00001001
and so on.
If you want to obscure your text but don't need to protect it against
any real decryption effort, consider using a (bidirectional) function
like this:
Function ROT128(ByVal S As String) As String
Dim j As Long
For j = 1 To Len(S)
Mid(S, j, 1) = Chr((Asc(Mid(S, j, 1)) + 128) Mod 256)
Next
ROT128 = S
End Function
Otherwise, a web search will probably find some encryption algorithms
implemented in VB(A).
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.