Experts Exchange connects you with the people and services you need so you can get back to work.
function strNStringAlpha(strInput, nConsecutive) as string
' Checks it there is any string of nConsecutive Alpha characters
' (A-Z, a-z) and returns the string if found
dim nLen as Long
dim n as Long
dim c as String
dim strResult as string
nLen = Len(strInput)
For n = 1 to nLen
c = Ucase(mid(strInput,n,1))
If c >="A" and c <= "Z" then
nAlpha = nAlpha + 1
strResult = strResult & mid(strInput,n,1)
if nAlpha = nConsecutive then
nAlpha = 0
strResult = ""
strNStringAlpha = strResult
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $259.00.
Premium members get this course for $62.50.
Premium members get this course for $79.20.
Premium members get this course for $299.99.
Premium members get this course for $159.20.
Premium members get this course for $37.50.