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.
count the number of hidden windows
-
wildkid -
July 26, 2018 at 4:24 AM -
Thread is marked as Resolved.
-
-
-
Code Tags Added
Your post does not comply with our Forum RULES. Use code tags around code.Posting code between
tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the # icon at the top of your post window.
(I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
-
[SIZE=13px]I suddenly realize I hid worksheets not WINDOWS. That's it always gives me 0 hidden windows. duh..[/SIZE]
-
Like this right?
Thank you for your help.[SIZE=13px]
Code[/SIZE][/FONT][/COLOR][/align][align=left][COLOR=#252C2F][FONT=Courier][SIZE=12px]Sub Hiddenwindows()[/SIZE][/FONT][/COLOR][/align]Dim Cnt as IntegerDim Win as windowCnt=0For each Win in WindowsIf Not Win.Visible then Cnt = Cnt +1Next WinMsgbox Cnt & " hidden windows"[align=left][COLOR=#252C2F][FONT=Courier][SIZE=12px]End Sub[/SIZE][/FONT][/COLOR][/align][align=left][COLOR=#252C2F][FONT=Helvetica][SIZE=13px]
[/SIZE][/FONT][/COLOR]
[/align]
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!