If Sh.UsedRange = 0 Then
If the count of the UR is two or more cells the above will fail.
If the only cell on the sheet, the UR, contains a value that evaluate to 0,
the test will return true but incorrect result.
AFAIK CountA should be fine but just for interest here's another way -
Sub test()
Dim c As Range
Dim ws As Worksheet
Set ws = ActiveSheet
For Each ws In ActiveWorkbook.Worksheets
Set c = Nothing
Set c = ws.Cells.Find(What:="*", After:=ws.Range("A1"), _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
Debug.Print ws.Name, "Is Empty : " & (c Is Nothing)
Next
End Sub
The OP really needs to define what "empty worksheet" is intended to mean.
The above Find method and CountA will confirm either way if any cell has a
value or formula (on which point Mike H's will give incorrect result if the
sheet has multiple empty but formatted cells).
If the intention is no formats and no contents, check for a UsedRange count
of 1 an CountA = 0 ( or the Find Method). Even with these checks potentially
a sheet could be entirely empty other than a format in A1 (more work can
check even that but overkill)
Regards,
Peter T