Opening Multipe Files Via VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top