Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() For Each wb In Application.Workbooks If wb.name Like "*This*" then wb.Activate Worksheets(3).Activate range("A3").Select End If Next wb -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "shorticake" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks so much Bob!
One last question, is there a way to say not like "*This*" ? "Bob Phillips" wrote: For Each wb In Application.Workbooks If wb.name Like "*This*" then wb.Activate Worksheets(3).Activate range("A3").Select End If Next wb -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "shorticake" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yeah, but it's tricky
If Not wb.name Like "*This*" then <VBG -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "shorticake" wrote in message ... Thanks so much Bob! One last question, is there a way to say not like "*This*" ? "Bob Phillips" wrote: For Each wb In Application.Workbooks If wb.name Like "*This*" then wb.Activate Worksheets(3).Activate range("A3").Select End If Next wb -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "shorticake" wrote in message ... 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Access Named range value with multiple workbooks open | Excel Programming | |||
Windows().Activate vs Workbooks().Activate | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
Excel VBA - Activate Open Workbooks to format | Excel Programming | |||
Use Array to activate workbooks | Excel Programming |