View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Is Worksheet Empty?

Sub zone()
MsgBox (Application.WorksheetFunction.CountA(Cells))
End Sub

will report 0 on an empty sheet
--
Gary''s Student - gsnu200745


"Zone" wrote:

I found that if a worksheet is completely empty, its UsedRange will be $A$1.
Then if A1 is empty, the worksheet is blank. But it seems there should be a
more elegant way to determine whether the worksheet is blank. TIA, James