View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Cannot Dechiper Encoded String

Looks like you have a typo, 66 vs 65

Try this too -

Sub test()
Dim i As Long, j As Long, k As Long
Dim Subject As String

Subject = "Auction"

For j = 0 To 1
k = 32 * j
For i = 65 To 65 + 26
sfind = Replace("&#num;", "num", CStr(i + k))
Subject = Replace(Subject, sfind, Chr$(i + k))
Next
Next
MsgBox Subject ' Auction
End Sub

Regards,
Peter T

"Dudely" wrote in message
...
I pull a text string off a web page, that contains some random text.
From time to time, the string will contain a mixture of ASCII and ISO
encoded characters. Sample below.

I'm unable to get any function to recognize the string.

I'm using VBA 6.0 with Excel 2000

Example code:

Subject= "Auction"

Subject = Replace(Subject, "B", "A")

I've also tried every other character that should be in that string.

The replacement never takes place, the string is unmodified. I've
also tried searching for just "&#" but it never finds that either.
I've tried using InStr as well but that fails to find a match too.
The goal is of course to dechiper the (random) string into it's ASCII
equivalent (so that it can be read by a human).

Any help?

Thank you in advance

- Dudely