Can anyone help with this;
I download a set of data which has hyperlinks which are not correct. I have a macro that changes the address of each link.
While inside the loop I need to go to the new hyperlink address and capture some data from the url then past it in a range
of cells addressed from the cell location of the current hyperlink.
example; hyperlinks are located in column "A" starting with row 5 then skip two rows and another hyperlink.
The Range of cells to past new data to would start with the current hyperlink, say the loop has updated the hyperlink
located in cell (A,11) Then the data should be writen beginning with (C, 10).
This is what I think I need to add to follow the hyperlink, copy the data and past to the worksheet where the hyperlink is located, but it does not work.
Can anyone suggest a code that follow the hyperlink that has changed inside the loop and copy the data then past to the cells located an offset from the cell containing the hyperlink?
Much appreciate any help or suggestions.
I download a set of data which has hyperlinks which are not correct. I have a macro that changes the address of each link.
While inside the loop I need to go to the new hyperlink address and capture some data from the url then past it in a range
of cells addressed from the cell location of the current hyperlink.
example; hyperlinks are located in column "A" starting with row 5 then skip two rows and another hyperlink.
The Range of cells to past new data to would start with the current hyperlink, say the loop has updated the hyperlink
located in cell (A,11) Then the data should be writen beginning with (C, 10).
Code:
Sub HyperLinkChange()
Dim hl As Hyperlink
For Each hl In ActiveSheet.Hyperlinks
hl.Address = Replace(hl.Address, "getscoutticket", "getwellprod")
Next hl
End Sub
This is what I think I need to add to follow the hyperlink, copy the data and past to the worksheet where the hyperlink is located, but it does not work.
Code:
ActiveCell.Range(don't know what to put here).Select
Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True
ActiveCell.Offset(-1, 2).Range("A1").Select
ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
Can anyone suggest a code that follow the hyperlink that has changed inside the loop and copy the data then past to the cells located an offset from the cell containing the hyperlink?
Much appreciate any help or suggestions.