Results 1 to 4 of 4

Change email address to hyperlink w/Macro

Threaded View

  1. #1
    Registered User
    Join Date
    05-04-2011
    Location
    Monticello, IN
    MS-Off Ver
    Excel 2016
    Posts
    18

    Change email address to hyperlink w/Macro

    I have a workbook with several sheet within and in column ther may or may not be e-mail addresses. If there is an e-mail address I want to make it hyperlink ready, I don't want to follow it or execute just make it available to be clicked on. I have some code that I am using to loop through the book and it's sheets.

    Sub Workbook_CheckEmail()
        
        Dim Thiswb As Workbook      ' Workbook in
        Dim wks As Worksheet
        Dim rngCheck As Range          ' Input Sheet w/data
        Dim MySheet As String
        Dim MySheetCount As Integer
        Dim dtRow As Long
    
        Application.ScreenUpdating = False
    
        Set Thiswb = ActiveWorkbook
        Set rngCheck = Range("C1:C255")
        MySheetCount = 0
        dtRow = 2
    
        For Each ws In ThisWorkbook.Worksheets
        MySheet = ws.Name
            Do Until dtRow > 255
                If ws.Range("C" & dtRow).Value Like "*@*" Then
                    ws.Range("C" & dtRow).Hyperlink(1) = True
                Else
                End If
            dtRow = dtRow + 1
            Loop
        MySheetCount = MySheetCount + 1
        Next ws
        
        If MySheetCount = 0 Then
            Debug.Print "No Cell Found !!!"
        Else
        End If
        
        
        Application.ScreenUpdating = True
        
    End Sub
    Hope this help someone that can help me - thanks in advance
    Last edited by dkub; 05-26-2011 at 12:23 PM. Reason: Solved - some great help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1