dkub,
Give this a try:
Sub Workbook_CheckEmail()
Dim wbActive As Workbook: Set wbActive = ActiveWorkbook
Dim rngCheck As String: rngCheck = "C1:C255"
Dim EmailCount As Long: EmailCount = 0
Dim ws As Worksheet, ThisCell As Range
Application.ScreenUpdating = False
For Each ws In wbActive.Worksheets
For Each ThisCell In ws.Range(rngCheck)
If InStr(1, ThisCell.Value, "@", vbTextCompare) > 0 Then
ActiveSheet.Hyperlinks.Add Anchor:=ThisCell, _
Address:="mailto:" & ThisCell.Value, _
TextToDisplay:=ThisCell.Value
EmailCount = EmailCount + 1
End If
Next ThisCell
Next ws
If EmailCount = 0 Then Debug.Print "No Cell Found !!!"
Application.ScreenUpdating = True
End Sub
Hope this helps,
~tigeravatar
Bookmarks