Hi all,

I've a problem with below code.

This code should open Hyperlinks in a selected row, save them and close it again (the opened sheets got new data).

I don't know where the problem is, but it always shows me "index outside the valid range"


Is it possible for someone to help me?


Private Sub CommandButton1_Click()
 
 Range("D7:D300").Select
For Each Cell In Selection
 Cell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
 Application.Wait (Now + TimeValue("00:00:02"))
 ActiveWorkbook.Save
 ActiveWindow.Close
Next Cell
End Sub
Thanks in advance
Chris_Chui