View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Corey ....[_2_] Corey ....[_2_] is offline
external usenet poster
 
Posts: 45
Default Find the other workbooks name

Try:
Sub Button1_Click()
Dim WB As Workbook
For Each WB In Application.Workbooks
Debug.Print WB.Name
If WB.Name < ThisWorkbook.Name Then
MsgBox "The other workbook names are : " & WB.Name
End If
Next
End Sub

Corey....
"MarkS" wrote in message
...
Hi,
I have two workbooks open to find the first workbooks name I use
ThisWorkBook.Name to problem is to find the other workbooks name. I need
to
copy some data from the second workbook to the first workbook, the name of
the second workbook always changes

Thanks