Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
show most recent files first when opening excel files Anne` Excel Discussion (Misc queries) 5 January 23rd 08 01:54 AM
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 PoundMutt Excel Discussion (Misc queries) 1 June 20th 07 03:50 AM
More efficient way for macro to run on multipe files? Kim Excel Programming 5 May 28th 07 10:04 AM
lookup from multipe cells cmccurdy23 Excel Discussion (Misc queries) 1 February 1st 07 09:06 PM
How can I view files chronologically when opening multiple files Stevilsize Excel Discussion (Misc queries) 3 July 26th 05 12:49 AM


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"