Function to determine if a specified worksheet contains data.
Author: michael@excelexperts.co.uk
Function IsSheetEmpty(wsName As String) As Boolean
If WorksheetFunction.CountA(Worksheets(wsName).Cells) = 0 Then
IsSheetEmpty = True
Else
IsSheetEmpty = False
End If
End Function