Reverse Chr() function a la Excel 'Code'

T

Todd Lemen

I know VBA has a Chr() function for assigning a character from a number
value. Excel has a "Code" function which does the reverse, namely, look at a
character and output its numeric "Chr" value. Anything like Excel's Code
function in VBA? I need to find instances of Chr(160) and replace it with
Chr(32) withing strings...

Thanks in advance,

TL
 
S

Stefan Hoffmann

hi Todd,

Todd said:
I know VBA has a Chr() function for assigning a character from a number
value. Excel has a "Code" function which does the reverse, namely, look at a
character and output its numeric "Chr" value. Anything like Excel's Code
function in VBA? Asc()

I need to find instances of Chr(160) and replace it with
Chr(32) withing strings...
Replace(AStr, Chr(160), Chr(32))


mfG
--> stefan <--
 
Top