类模块里添加match类型出错,用户定义类型未定义(高手Help)?
在过程中定义没有问题,不知道错误的原因。
Private Sub Class_Initialize()
End Sub
Private Sub Class_Terminate()
End Sub
'match的m始终改成大小写
Public Function TryGetMatch(ByVal text As String, ByVal pat As String, ByRef m As match) As bool
Dim re As RegExp
Dim matches As MatchCollection
Set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.Pattern = pat
Set matches = re.Execute(text)
If matches.Count <> 0 Then
m = matches(0)
TryGetMatch = True
Else
TryGetMatch = False
End If
End Function