View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Activate Range for Workbooks Already Open

Dim sh As Worksheet
Dim wb As Workbook
For Each wb In Workbooks
If wb.Name < ThisWorkbook.Name Then
wb.Activate
For Each sh In Active.Workbook.Sheets
If sh ('meets criteria) Then
'Do Something
End If
Next
End If
Next

"shorticake" wrote:

Could anyone help me with code to search through the file names of workbooks
I already have open, and for each file that meets my search criteria make a
specific worksheet and range active?

Thanks