0

I have found a previous thread that shows how to get all open windows and their names using C# : get the titles of all open windows

However, I need to do this in VBA: does anyone know if that's possible?

Thank you so much.

Best regards

Figdor
  • 25
  • 1
  • 6

1 Answers1

-1
Sub ListWindows()
    Dim wn As Excel.Window
    For Each wn In Application.Windows
        Debug.Print wn.Caption
    Next wn
End Sub

if you wanted to activate any of them simply use:

 wn.Activate
Ibo
  • 3,691
  • 6
  • 40
  • 59