|
Visual Basic (VB6 and VBA) |
|
Copyright 1999-2001 Christopher Greaves. All rights reserved. Home Page and email to [email protected] |
| If in doubt, record a macro and inspect the entrails! |
Visual Basic Library
This page was last updated on Saturday, November 24, 2001
Public Function strAlphaOnly(strIn As String) As String ' Procedure : strAlphaOnly ' Description: This code returns only alphabetic characters of strIn. ' Copyright: Chris Greaves Inc. ' Inputs: A data string. ' Returns: STRING. ' Assumes: Nothing ' Side Effects: None. ' Tested: By the calls shown below. ' Posted in Woody's Lounge VBA forum strAlphaOnly = strOnly(strIn, strcAlpha) 'Sub TESTstrAlphaOnly() 'MsgBox strAlphaOnly("alphabet") ' yields "alphabet" 'MsgBox strAlphaOnly("") ' empty string 'MsgBox Len(strAlphaOnly(" ")) ' empty string, length = 0 'MsgBox strAlphaOnly("alphabetand1digit") ' strip "1" yielding "alphabetand1digit" 'MsgBox Len(strAlphaOnly("0123456789")) ' empty string, length = 0 'End Sub End Function
| We all knew nothing when we started … |
|
Home Page and Contact Information Send email to [email protected]. This page was last updated Monday, November 19, 2001 |