ASCII 133 -- Accented A or Ellipse

  • Thread starter Thread starter Tim Wilson
  • Start date Start date
T

Tim Wilson

Product: Excel XP / VBA (US)
Platform: Windows 2000

Issue: When the three characters "..." are read from an
Excel cell into a fixed length string variable, VBA
interprets the string as a single character rather than
three characters. This is a problem for my application.
Here is how you can re-create this issue:

In Excel, put this string in cell A1 "1...1"

In VBA, do the following.

------------------------------
Sub TestRoutine()
Dim strTest As String * 1
strTest = Mid(Cells(1, 1), 2, 1)
MsgBox Asc(strTest)
MsgBox Len(Cells(1, 1).Value)
End Sub
-------------------------------

In the first message box, VBA will display ASCII value
133 -- it should be 46.

In the second message box, VBA displays a string length of
3, it should be 5.

Any ideas how to alter this behavior? Couldn't find a
reference in Microsoft support.

Thanks.
 
My apologies to the group. I found the answer in a
previous email when I searched on "133". This is behavior
as designed.

Deleting the elipsis (...) from autocorrect resolves the
issue.

Thanks Jaf -- I don't think I would have figured that one
out.

Later.
 
Back
Top