View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Eric Eric is offline
external usenet poster
 
Posts: 1,670
Default Opening Multipe Files Via VBA

Thanks Wigi!

"Wigi" wrote:

Remove the Exit Sub.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Eric" wrote:

I have the following code which looks for a value of true in column B, then
opens it's associated .pdf hyperlinked in column E. The problem I'm having is
that this stops after finding the first 'True' value in the range, openng
only one file. Is there a way to have this continue and open ALL files with
the 'True' value in column B?

Thanks for any insight!


Private Sub PrintEqButton_Click()
For Each r In Range("B1:B200")
If r.Value = True Then
s = r.Offset(0, 3).Value
ActiveWorkbook.FollowHyperlink Address:=s
Exit Sub
End If
Next

End Sub