Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if a sheet is open

I'm writing a Cocoa app and basically I have a window and I need to check if a sheet is open before I open another window. Google doesn't seem to know that one. How may I check if the sheet is open or not?

like image 448
Fernando Valente Avatar asked Feb 27 '12 03:02

Fernando Valente


People also ask

How do you check if a sheet is active in VBA?

You could use set sh = ActiveSheet , or strShName = ActiveSheet.Name . Show activity on this post. Test for matching worksheet and workbook names.

How do I check if a worksheet exists?

What is this? With this code we can use =WorksheetExists(B3) to test any text string to see if it exists as a sheet name in the current workbook.

How do you check if a sheet is protected in Excel?

If you suspect the sheet you are viewing is protected, you can navigate to the Review tab on your Excel Ribbon and checkout the Protect buttons. If the first button's name is Unprotect Sheet, you know your ActiveSheet is currently protected.


1 Answers

-[NSWindow attachedSheet]

BOOL hasSheet = ([window attachedSheet] != nil);
like image 131
jscs Avatar answered Oct 03 '22 00:10

jscs