当我的电子邮件有像屏幕截图qazxsw poi那样糟糕的格式时,我的单元格如何变成红色?
http://prntscr.com/ilgbcd
我想你的代码调用 Function EmailValide(ByVal strEmail As String) As Boolean
Dim re As VBScript_RegExp_55.RegExp
' We create a regular expression
Set re = New VBScript_RegExp_55.RegExp
' We define the criteria to respect for an e-mail
re.Pattern = "w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*"
'The RegExp.Test function returns True if the email meets the criteria
EmailValide = re.Test(strEmail)
End Function
会是这样的:
EmailValide()
然后你可以使用:
Dim myCell As Range
...
Set myCell = Range("...") ' set myCell in some way
...