This is ridiculous code:

If ws.name Like "Warning_Markers*" Then
 Dim M As Double
 M = ws.Rows.Count '   avoid overflow
 M = M * ws.Columns.Count
 If Application.CountBlank(ws.Cells) = M Then
   MsgBox ws.name & " is empty"
   Exit Sub
 End If
You should replace it by

If ws.usedrange.address <>"$A$1" Then