I need to count the number of windows that are hidden and display a pop-up window. My code keep giving me "0 hidden windows" no matter how many windows I've hidden, please help.
Sub Hiddenwindows()
Sub Hiddenwindows()
Dim Cnt as Integer
Dim Win as window
Cnt=0
For each Win in Windows
If Not Win.Visible then Cnt = Cnt +1
Next Win
Msgbox Cnt & " hidden windows"
Dim Win as window
Cnt=0
For each Win in Windows
If Not Win.Visible then Cnt = Cnt +1
Next Win
Msgbox Cnt & " hidden windows"
End Sub