Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don't know if this is a good way, but using Excel2000, I'm trying
to use Like to identify certain workbooks, but with no success. The workbooks will all be named something General Summary.xls ie Project 2 Final General Summary.xls I'd like to open all files from a certain folder (which I can do) then exclude the General Summary book from the routine, work on all other files, then transfer data to the General Summary file, before saving and closing all files. If FileCounter 0 Then Application.ScreenUpdating = False For LoopCounter = 1 To FileCounter Workbooks.Open vFilename & FilesArray(LoopCounter), False NameOfFile = Application.ActiveWorkbook.Name If ActiveWorkbook.Name Like ??? Then ExcludeBook = ActiveWorkbook.Name GoTo Line3 Is this achievable please? Regards --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.655 / Virus Database: 420 - Release Date: 08/04/2004 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Yeah, you can do that Activeworkbook.Name Like "*General Summary*" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Stuart" wrote in message ... Don't know if this is a good way, but using Excel2000, I'm trying to use Like to identify certain workbooks, but with no success. The workbooks will all be named something General Summary.xls ie Project 2 Final General Summary.xls I'd like to open all files from a certain folder (which I can do) then exclude the General Summary book from the routine, work on all other files, then transfer data to the General Summary file, before saving and closing all files. If FileCounter 0 Then Application.ScreenUpdating = False For LoopCounter = 1 To FileCounter Workbooks.Open vFilename & FilesArray(LoopCounter), False NameOfFile = Application.ActiveWorkbook.Name If ActiveWorkbook.Name Like ??? Then ExcludeBook = ActiveWorkbook.Name GoTo Line3 Is this achievable please? Regards --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.655 / Virus Database: 420 - Release Date: 08/04/2004 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wildcards
Many thanks Regards. "Bob Phillips" wrote in message ... Yeah, you can do that Activeworkbook.Name Like "*General Summary*" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Stuart" wrote in message ... Don't know if this is a good way, but using Excel2000, I'm trying to use Like to identify certain workbooks, but with no success. The workbooks will all be named something General Summary.xls ie Project 2 Final General Summary.xls I'd like to open all files from a certain folder (which I can do) then exclude the General Summary book from the routine, work on all other files, then transfer data to the General Summary file, before saving and closing all files. If FileCounter 0 Then Application.ScreenUpdating = False For LoopCounter = 1 To FileCounter Workbooks.Open vFilename & FilesArray(LoopCounter), False NameOfFile = Application.ActiveWorkbook.Name If ActiveWorkbook.Name Like ??? Then ExcludeBook = ActiveWorkbook.Name GoTo Line3 Is this achievable please? Regards --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.655 / Virus Database: 420 - Release Date: 08/04/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.655 / Virus Database: 420 - Release Date: 08/04/2004 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if instr(1,Activeworkbook.name,"general summary", vbTextCompare) < 0 then
-- Regards, Tom Ogilvy "Stuart" wrote in message ... Don't know if this is a good way, but using Excel2000, I'm trying to use Like to identify certain workbooks, but with no success. The workbooks will all be named something General Summary.xls ie Project 2 Final General Summary.xls I'd like to open all files from a certain folder (which I can do) then exclude the General Summary book from the routine, work on all other files, then transfer data to the General Summary file, before saving and closing all files. If FileCounter 0 Then Application.ScreenUpdating = False For LoopCounter = 1 To FileCounter Workbooks.Open vFilename & FilesArray(LoopCounter), False NameOfFile = Application.ActiveWorkbook.Name If ActiveWorkbook.Name Like ??? Then ExcludeBook = ActiveWorkbook.Name GoTo Line3 Is this achievable please? Regards --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.655 / Virus Database: 420 - Release Date: 08/04/2004 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook Question | Excel Discussion (Misc queries) | |||
Workbook question... | Excel Discussion (Misc queries) | |||
Question about linking to another workbook | Setting up and Configuration of Excel | |||
workbook question | Excel Discussion (Misc queries) | |||
Question for Experts: Opening workbook with workbook references | Excel Programming |