I'm looking for a method of checking if an excel sheet is currently active (currently shown). I'm interested in a synchronous method and not in an event.
You could use set sh = ActiveSheet
, or strShName = ActiveSheet.Name
.
To test if sheet Xyz is active: If ActiveSheet.Name = "xyz" Then
You can also use If ActiveSheet.CodeName = "Sheet1" Then
(VBE name)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With