G
Guest
Hello all,
I am using this function in an update query to try and strip out invalid
characters in a memo field. The problem is when I export this memo field to
Excel, it corrupts excel. I'm pretty sure the problem is with invalid
characters in the memo field.
Error 6 (Overflow) on line 20
What am i doing wrong?
Public Function GetAlphaString(strMyString) As String
Dim i As Integer
Dim iAsc As Integer
20 For i = 1 To Len(strMyString)
30 iAsc = Asc(Mid(strMyString, i, 1))
40 If (iAsc >= 32 And iAsc <= 123 = 0) Then
50 GetAlphaString = Right(strMyString, Len(strMyString) - i + 1)
60 Exit For
70 End If
80 Next i
I am using this function in an update query to try and strip out invalid
characters in a memo field. The problem is when I export this memo field to
Excel, it corrupts excel. I'm pretty sure the problem is with invalid
characters in the memo field.
Error 6 (Overflow) on line 20
What am i doing wrong?
Public Function GetAlphaString(strMyString) As String
Dim i As Integer
Dim iAsc As Integer
20 For i = 1 To Len(strMyString)
30 iAsc = Asc(Mid(strMyString, i, 1))
40 If (iAsc >= 32 And iAsc <= 123 = 0) Then
50 GetAlphaString = Right(strMyString, Len(strMyString) - i + 1)
60 Exit For
70 End If
80 Next i