• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Replacing hyperlinks with find and Replace

Abubakr Masood

New Member
Hi all,

Hope everyone is doing fine in everyday life,

I am having problem with a macro that I have recorded, it copies updated Link using Find and replace function but the vba code have harcoded the link, it can only be used once then it is useless, Updated link is in a cell as text.
I am unable to search up any solution for this problem I need urgent help ! Problem is highlighted in the code below.

>>> Your urgent means for You that You're late <<<
>>> use code - tags >>>
Code:
Sub Test1()

Range("H1").Select
Selection.Copy
Range("H2").Select
Application.CutCopyMode = False
Selection.Copy
Range("B4:V5").Select
Range(Selection, Selection.End(xlDown)).Select
'    highlighted What & Replacement
Selection.Replace What:= _
"C:\Users\AB-Uc\Desktop\[Landing cost 31-Dec-2022.xlsx]Sheet1'!$F$7" _
, Replacement:= _
"C:\Users\AB-Uc\Desktop\Junk\[Budgeted sale.xlsx]Summary'!$A$21" _
, LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat _
:=False, ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2

End Sub
 
Last edited by a moderator:
Hi, follow any Excel forum rules for cross-posting :​
 
Back
Top