Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am getting a VALUE error when I run this function and the input string is
longer than 255. Basicaly, I am wanting to strip out all control characters. Is there a better way to do that? TIA, Mc Public Function CleanKey(vData As String) As String Dim nChar As Long Dim sChar As String * 1 Dim nCharCode As Long Dim sNewData As String For nChar = 1 To Len(vData) sChar = Mid$(vData, nChar, 1) nCharCode = Asc(sChar) If nCharCode <= Asc("~") And nCharCode = Asc(" ") _ Then sNewData = sNewData & sChar Next nChar CleanKey = sNewData End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workaround for HYPERLINK argument length limit | Excel Worksheet Functions | |||
Excel text export limit - 1024 per line (not cell), workaround? | Excel Discussion (Misc queries) | |||
Limit on logical function | Excel Discussion (Misc queries) | |||
busted workaround for 255 character limit in cells | Excel Programming | |||
IF Function Help due to 7 limit | Excel Worksheet Functions |