Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening Multipe Files Via VBA
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening Multipe Files Via VBA
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
show most recent files first when opening excel files | Excel Discussion (Misc queries) | |||
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 | Excel Discussion (Misc queries) | |||
More efficient way for macro to run on multipe files? | Excel Programming | |||
lookup from multipe cells | Excel Discussion (Misc queries) | |||
How can I view files chronologically when opening multiple files | Excel Discussion (Misc queries) |