Hi,

Try this For Each...Next loop instead:
For Each nName In ThisWorkbook.Names
    If nName.RefersToRange.Worksheet.Name = shtname Then
        nName.Delete
    End If
Next nName
Hope this helps