Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2007

Tip: Looking for answers? Try searching our database.

Activate Range for Workbooks Already Open

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shorticake - 13 Dec 2007 22:51 GMT
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
Bob Phillips - 13 Dec 2007 23:23 GMT
For Each wb In Application.Workbooks

       If wb.name Like "*This*" then

           wb.Activate
           Worksheets(3).Activate
           range("A3").Select
       End If
   Next wb

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Could anyone help me with code to search through the file names of
> workbooks
[quoted text clipped - 3 lines]
>
> Thanks
shorticake - 14 Dec 2007 14:54 GMT
Thanks so much Bob!  

One last question, is there a way to say not like "*This*" ?

>     For Each wb In Application.Workbooks
>
[quoted text clipped - 13 lines]
> >
> > Thanks
Bob Phillips - 14 Dec 2007 17:16 GMT
Yeah, but it's tricky

        If Not wb.name Like "*This*" then

<VBG>

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Thanks so much Bob!
>
[quoted text clipped - 18 lines]
>> >
>> > Thanks
JLGWhiz - 13 Dec 2007 23:30 GMT
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

> 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.