Christopher Greaves

Contact Me

ON LINE STORE

ON LINE STORE

ON LINE STORE

ON LINE STORE

Building and Maintaining Excel Libraries

If you are interested in applications please visit www.VBASolutions.ca .

If you are interested in end-user macros please visit www.TorontoMacros.com .

strOnly

This function takes two string arguments and returns only those characters of the first string which match the second string.

A character string looks like this:

"Christopher,Paul,Reynolds,Greaves"

We can obtain only the lower-case alphabetic characters by using strOnly:

strOnly("Christopher,Paul,Reynolds,Greaves", UW.strcLowerAlpha)

UW has a variety of available string constants.

Sub TESTstrOnly()

MsgBox UW.strOnly("What a bargain!", UW.strcLowerAlpha)

MsgBox UW.strOnly("What a bargain!", UW.strcUpperAlpha)

MsgBox UW.strOnly("What a bargain!", UW.strcAlpha)

MsgBox UW.strOnly("What a bargain!", UW.strcNonAlphaDigits)

End Sub

Contact Me