acros@googlegroups.com [mailto:excel-macros@googlegroups.com] On
Behalf Of Ali Abbas
Sent: 01 March 2013 12:36
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ Re: Assignment
Good job
On Mar 1, 2013 6:25 AM, "Prince"
mailto:prince141...@gmail.com>> wrote:
Hi,
Check
HI,
Try it,
Function ValidateString(strInput As String) As String
Dim strInvalidChars As String
Dim i As Long
strInvalidChars = "*,?~@#$%^&()_+{}[]:;<>" & "'" &
For i = 1 To Len(strInvalidChars)
strInput = Replace$(strInput, Mid$(strInvalidChars, i, 1), "")
Next
ValidateString = strInput
End
Hi,
Check this May be if it can help you.
Function GetNumberS(strData As String) As String
Dim objRge As Object, REMatches As Object
Set objRge = CreateObject("vbscript.regexp")
With objRge
'.Pattern = "[0-9][0-9][0-9][0-9]"
.Pattern = "(\d+)"
End With