I previously posted another post regarding my overall goal of what I want to do but may have to scale back on the project or get help with it bit by bit...so instead I ask for help with the following code if anyone could help fine tune it.
What I want is for the macro to open each hyper link in the range, but pause for 5 seconds after it opens each one.
here is what I have and it works kinda:
Sub OpenLinks()
Dim Pallets As Range, Cell As Range
Set Pallets = Range("F2:F11") 'Range containing hyper links
For Each Cell In Pallets
If IsEmpty(Cell) Then
Exit Sub
End If
If Cell.Value <> "" Then
Cell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=False
End If
Next
For a = 0 To 3
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 3
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
If Application.Wait(Now + TimeValue("0:00:3")) = True Then
End If
Next a
Set Pallets = Range("F12:F21")
For Each Cell In Pallets
If IsEmpty(Cell) Then
Exit Sub
End If
If Cell.Value <> "" Then
Cell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=False
End If
Next
For a = 0 To 3
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 3
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
If Application.Wait(Now + TimeValue("0:00:3")) = True Then
End If
Next a
Set Pallets = Range("F22:F31")
For Each Cell In Pallets
If IsEmpty(Cell) Then
Exit Sub
End If
As you can see the method I'm using doesn't work very well and it is alot of code. The above example shows a pause of 9 seconds but I would like to cut that back to 5 seconds and open only 1 link at a time.
This post has now been cross posted at: http://answers.yahoo.com/question/in...4005448AAkGdJK
Bookmarks