Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook Question Renee Excel Discussion (Misc queries) 2 March 12th 10 06:45 PM
Workbook question... Maurice Excel Discussion (Misc queries) 1 July 21st 09 12:03 AM
Question about linking to another workbook Susan Setting up and Configuration of Excel 1 July 17th 08 09:29 PM
workbook question Jackie Excel Discussion (Misc queries) 9 August 13th 06 09:25 PM
Question for Experts: Opening workbook with workbook references Chris Excel Programming 0 September 11th 03 07:05 PM


All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"