+ Reply to Thread
Results 1 to 3 of 3

VBA code for Hyperlink fixing

  1. #1
    Registered User
    Join Date
    08-18-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    2

    VBA code for Hyperlink fixing

    Dear All,

    I am using following code for fixing Hyperlinks

    Sub Fix192Hyperlinks()
    Dim OldStr As String, NewStr As String
    OldStr = "C:\Documents and setting\Production\desktop"
    NewStr = "D:\Narendra\Damage Details\West Deatils"
    Dim hyp As Hyperlink
    For Each hyp In ActiveSheet.Hyperlinks
    hyp.Address = Replace(hyp.Address, OldStr, NewStr)
    Next hyp
    End Sub

    However, while running the code - It runs & showing no error. But the links are not updating to newstr.

    Pl help me on this.

    Thanks & Regards
    Narendra

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: VBA code for Hyperlink fixing

    Perhaps Option Compare Text at the beginning of the module might help.

    Or:

    Please Login or Register  to view this content.

    If this doesn't help, post a sample workbook.

    PS: you should enclose your code in
    HTML Code: 
    Regards

  3. #3
    Registered User
    Join Date
    08-18-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: VBA code for Hyperlink fixing

    Dear TMShucks

    Thanks for showing intrest.

    Please find attached herewith the sample workbook.

    Thanks & Regards
    Narendra
    Attached Files Attached Files

+ Reply to Thread

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