globalbear
IS-IT--Management
I need to make a "for each sh in worksheets" loop in my code. The problem is I only want to loop the selected sheets.
All sheets that are not selected should not be affected in my for-each loop.
Say I have 5 sheets: Sheet1-Sheet5. Sheet2 and Sheet4 are selected by the user. Now, I want the for each-loop run only for Sheet2 & Sheet4 and not for Sheet1,Sheet3 or Sheet5.
How can I do this?
I noticed there is something called "activesheet.visible" which returns -1 if the sheet is visible. Is there something similar like "activesheet.selected" that I could use?
All sheets that are not selected should not be affected in my for-each loop.
Say I have 5 sheets: Sheet1-Sheet5. Sheet2 and Sheet4 are selected by the user. Now, I want the for each-loop run only for Sheet2 & Sheet4 and not for Sheet1,Sheet3 or Sheet5.
How can I do this?
I noticed there is something called "activesheet.visible" which returns -1 if the sheet is visible. Is there something similar like "activesheet.selected" that I could use?