If you to check if a particular file you are looking for is currently open, use this function

Code:
Function IsBookOpen(strNameOfFile As String) As Boolean
    Dim wbk As Workbook
    
    For Each wbk In Application.Workbooks
        If InStr(1, wbk.Name, strNameOfFile) Then
            IsBookOpen = True: Exit For
        End If
    Next wbk
    
End Function
and call it like this

Code:
IsBookOpen "MyBook.xlsx"
If you want a list of all open workbooks, try modifying by taking out the if condition and printing out the names of each workbook like for example
Code:
Msgbox wbk.Name