Consulting

Results 1 to 8 of 8

Thread: Solved: Remove Hyperlinks

  1. #1
    VBAX Tutor GaryB's Avatar
    Joined
    Jun 2004
    Location
    Stockton, California
    Posts
    270
    Location

    Solved: Remove Hyperlinks

    Hi,

    I have a question regarding hyperlinks on spreadsheet. Is there any way to make a global change to a make a hyperlink not be a hyperlink. All I have been able to find is standard remove hyperlink and that only works one at a time.

    Thanks For any help on this.

    GaryB

  2. #2
    VBAX Regular vonpookie's Avatar
    Joined
    Jun 2004
    Location
    Are we there yet?
    Posts
    74
    Location
    Yup, it's in the autocorrect options.
    Tools\AutoCorrect Options\AutoFormat As You Type\uncheck the box next to "Internet and network paths with hyperlinks."

    Note: That will only stop it from automatically linking addresses/e-mail addresses in the future. Any links you already have in teh sheet will still be linked.

  3. #3
    VBAX Tutor GaryB's Avatar
    Joined
    Jun 2004
    Location
    Stockton, California
    Posts
    270
    Location
    Thanks,

    But I'm looking for something to remove the hyperlink for records I already have on the sheet.

    Gary

  4. #4
    VBAX Regular vonpookie's Avatar
    Joined
    Jun 2004
    Location
    Are we there yet?
    Posts
    74
    Location
    For that you need a macro.

    One way:
    [vba]Sub RemoveHyperlinks()
    Dim c As Range

    Application.ScreenUpdating = False
    For Each c In Selection
    On Error Resume Next
    c.Hyperlinks(1).Delete
    On Error GoTo 0
    Next c
    Application.ScreenUpdating = True


    End Sub
    [/vba]

    Select a range of cells, then run the macro to remove the links from that range.

  5. #5
    VBAX Tutor GaryB's Avatar
    Joined
    Jun 2004
    Location
    Stockton, California
    Posts
    270
    Location
    Quote Originally Posted by vonpookie
    Yup, it's in the autocorrect options.
    Tools\AutoCorrect Options\AutoFormat As You Type\uncheck the box next to "Internet and network paths with hyperlinks."

    Note: That will only stop it from automatically linking addresses/e-mail addresses in the future. Any links you already have in teh sheet will still be linked.
    It turns out I do need what you suggested also. But when I don't show an autocorrect options. I am using office 2000. I show autocorrect but non of the sub-menus show me what you suggested.

    Gary

  6. #6
    VBAX Tutor GaryB's Avatar
    Joined
    Jun 2004
    Location
    Stockton, California
    Posts
    270
    Location
    Thanks Vonpookie,

    The code worked like a charm. I appreciate the help.

    Gary

  7. #7
    Administrator
    Chat VP
    VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    No need to loop, it's slow, just use
    [VBA]
    Selection.Hyperlinks.Delete
    [/VBA]Or, for the whole sheet
    [VBA]
    Cells.Hyperlinks.Delete
    [/VBA]
    You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you

    The major part of getting the right answer lies in asking the right question...


    Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.

  8. #8
    VBAX Regular vonpookie's Avatar
    Joined
    Jun 2004
    Location
    Are we there yet?
    Posts
    74
    Location
    Quote Originally Posted by GaryB
    It turns out I do need what you suggested also. But when I don't show an autocorrect options. I am using office 2000. I show autocorrect but non of the sub-menus show me what you suggested.

    Gary
    I don't have 2000 available to double-check, but I believe it's the same. Make sure you switch to the correct tab labeled "Autoformat as you type." The option for hyperlinks is there.

Posting Permissions

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