D Defranco Jun 17, 2008 #1 Hi all, Excel supports the use of Regular Expressions (RegEx) in formulas? How do I use it? Thanks
B Bob Phillips Jun 17, 2008 #2 An example Function ValidFileName(ByVal TheFileName As String) As Boolean Dim RegEx As Object Set RegEx = CreateObject("vbscript.regexp") RegEx.Pattern = "[\\/:\*\?""<>\|]" ValidFileName = Not RegEx.Test(TheFileName) Set RegEx = Nothing End Function
An example Function ValidFileName(ByVal TheFileName As String) As Boolean Dim RegEx As Object Set RegEx = CreateObject("vbscript.regexp") RegEx.Pattern = "[\\/:\*\?""<>\|]" ValidFileName = Not RegEx.Test(TheFileName) Set RegEx = Nothing End Function
R Ron Rosenfeld Jun 17, 2008 #3 Hi all, Excel supports the use of Regular Expressions (RegEx) in formulas? How do I use it? Thanks Click to expand... http://support.microsoft.com/default.aspx?scid=kb;en-us;818802&Product=vbb --ron
Hi all, Excel supports the use of Regular Expressions (RegEx) in formulas? How do I use it? Thanks Click to expand... http://support.microsoft.com/default.aspx?scid=kb;en-us;818802&Product=vbb --ron