![]() |
Workbook Name question
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 |
Workbook Name question
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 |
Workbook Name question
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 |
Workbook Name question
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 |
All times are GMT +1. The time now is 10:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com