VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

ckReplace (now with invalid char stripping)

Chad M. Kovac  (4 Submissions)   Microsoft Office Apps/VBA   Visual Basic 3.0   Advanced   Wed 3rd February 2021

For use with MS Access databases mostly. - this function allows you to with strip characters from a string, replace characters in a string with other characters or strip/replace all non-alpha characters (not printable) from the string.

Inputs
strIN is the string you wish to modify 'StripChar is the character you wish to remove/replace 'ReplaceChar is the character to use in "Stripchar"s place. 'Only strIN is required.

Returns
Returns the submitted string with the modifications made as a string: 'ckReplace("This is a test"," ","") returns "Thisisatest" 'ckReplace("This is a test","i","x") returns "Thxs xs a test" 'ckReplace("Sometext%MoreText") where the % represents some non printing character (like a line feed or someting - would return "SometextMoreText" 'ckReplace("Sometext%MoreText",""," ") where the % represents some non printing character (like a line feed or someting - would return "Sometext MoreText"

Rate ckReplace (now with invalid char stripping) (3(3 Vote))
ckReplace (now with invalid char stripping).bas

ckReplace (now with invalid char stripping) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters