Going down a line in Excel VBA

Closed
mndude Posts 2 Registration date Friday 15 January 2016 Status Member Last seen 15 January 2016 - 15 Jan 2016 à 15:28
 Blocked Profile - 15 Jan 2016 à 16:57
I'm trying to write a simple Excel macro that will basically click on hyperlinks within the cells, but I don't know how to have it go down to the next line automatically. Here is what I currently have:

"Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("E4").Select
Application.Wait Now + TimeValue("00:00:20")
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("E5").Select
Application.Wait Now + TimeValue("00:00:20")
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("E6").Select
Application.Wait Now + TimeValue("00:00:20")
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("E7").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("E8").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True"

As there'll be thousands of lines to go down to, I would like to have it just go to the next line without having to write thousands of lines of code like this. How should I type this?
Related:

1 response

Blocked Profile
15 Jan 2016 à 16:57
A FOR loop will accomplish this!