Hello,
I have a list with 3 columns:
Package Name:
Latest Date:
Link:
The VBA should click on the link, go to the linked sheet, capture a value and return to the main page.
I have a problem with writing a loop to go through the link in each row.
Can you please help:
[TABLE="width: 215"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Package [/TD]
[TD]Date[/TD]
[TD]Link[/TD]
[/TR]
[TR]
[TD]kolabi Pack[/TD]
[TD]1-Jan-19[/TD]
[TD]VIC[/TD]
[/TR]
[TR]
[TD]Anjan Pack[/TD]
[TD]12-Aug-18[/TD]
[TD]TAS[/TD]
[/TR]
[TR]
[TD]Coala Pack[/TD]
[TD]4-Dec-18[/TD]
[TD]WA
[/TD]
[/TR]
</tbody>[/TABLE]
Code:
Sub Lop
Sheet1.Activate
count1 = Range("c2", Range("c1").End(xlDown)).Cells.count
y = 2
Do Until y = count1
Sheet1.Activate
Range("C" & y).Hyperlinks(Range("C" & y).Value).Follow NewWindow:=False, addhistory:=True
y = y + 1
Loop
end sub
I have a list with 3 columns:
Package Name:
Latest Date:
Link:
The VBA should click on the link, go to the linked sheet, capture a value and return to the main page.
I have a problem with writing a loop to go through the link in each row.
Can you please help:
[TABLE="width: 215"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Package [/TD]
[TD]Date[/TD]
[TD]Link[/TD]
[/TR]
[TR]
[TD]kolabi Pack[/TD]
[TD]1-Jan-19[/TD]
[TD]VIC[/TD]
[/TR]
[TR]
[TD]Anjan Pack[/TD]
[TD]12-Aug-18[/TD]
[TD]TAS[/TD]
[/TR]
[TR]
[TD]Coala Pack[/TD]
[TD]4-Dec-18[/TD]
[TD]WA
[/TD]
[/TR]
</tbody>[/TABLE]
Code:
Sub Lop
Sheet1.Activate
count1 = Range("c2", Range("c1").End(xlDown)).Cells.count
y = 2
Do Until y = count1
Sheet1.Activate
Range("C" & y).Hyperlinks(Range("C" & y).Value).Follow NewWindow:=False, addhistory:=True
y = y + 1
Loop
end sub