Ste_Moore01
Active Member
- Joined
- Jul 13, 2005
- Messages
- 467
Hi,
I've made myself a little code..
It looks in the range A5:A65536 to find the Hyperlinks, and when it finds them it should open them.
The problem is, it finds the first Hyperlink and opens it and then stops because it's in a new workbook.
I know I need to add in the code to get back to my original workbook which would be..
But I'm unsure as where to put it as I've tried putting it before the "Next c" and bit and after.
Does anyone have any suggestions as I'm quite new to this.
Thanks!
I've made myself a little code..
Code:
Sub Macro1()
Dim HyperlinkRange As Range
Set HyperlinkRange = Range("A5:A65536")
For Each c In HyperlinkRange
If c.Value <> "" Then ActiveWorkbook.FollowHyperlink c
Next c
End Sub
It looks in the range A5:A65536 to find the Hyperlinks, and when it finds them it should open them.
The problem is, it finds the first Hyperlink and opens it and then stops because it's in a new workbook.
I know I need to add in the code to get back to my original workbook which would be..
Code:
Windows("FILES.xls").Activate
But I'm unsure as where to put it as I've tried putting it before the "Next c" and bit and after.
Does anyone have any suggestions as I'm quite new to this.
Thanks!