Horje
regex numeric digits Code Example
regex numeric digits
' Needs reference "Microsoft VBScript Regular Expressions 5.5"
Dim rRegex As Object
Set rRegex = CreateObject("VBScript.RegExp")

rRegex.Pattern = "[0-9]{8,9}"   ' 8 or 9 numbers
MsgBox rRegex.test("12345678")  ' True

rRegex.Pattern = "[0-9]+"       ' Numeric of any size
MsgBox rRegex.test("12345")     ' True




3

Related
excel vba last row Code Example excel vba last row Code Example
xlvba double quotes in string literal Code Example xlvba double quotes in string literal Code Example
excel formula how to create strings containing double quotes Code Example excel formula how to create strings containing double quotes Code Example
vba how to convert a column number into an Excel column Code Example vba how to convert a column number into an Excel column Code Example
excel vba copy entire sheet paste values Code Example excel vba copy entire sheet paste values Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10