Workbook Name question

S

Stuart

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
 
B

Bob Phillips

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)
 
S

Stuart

Wildcards

Many thanks

Regards.

Bob Phillips said:
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top