View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default use only part of window name in a macro

You could do something like this

Dim myWB As Excel.Workbook
For Each myWB In Application.Workbooks
If myWB.Name Like "Time Sheet For*" Then
Windows(myWB.Name).Activate
Exit For
End If
Next myWB

--
HTH,
Barb Reinhardt




"Paul B" wrote:

How would you use only part of the window name in a macro, the dates will
change so I only need to use Time Sheet For



Windows("Time Sheet For 09.18.2008 To 10.01.2008.xls").Activate