You could also add exit for line in the sub once the code found the sheet so it will not loop unnecessarily.
Sub DelVarWs()
Dim rng As Range, sName As String, ws As Worksheet
Set rng = ActiveSheet.Buttons(Application.Caller).TopLeftCell 'These next two lines were the secret sauce
rng.Select 'Sometimes, all it takes is a good nights sleep to come back and figure it all out
sName = ActiveCell.Offset(1, 0).value
Set ws = ThisWorkbook.Worksheets(sName)
For Each ws In ThisWorkbook.Worksheets
If ws.Name = sName Then
Application.DisplayAlerts = False
ws.Delete
Application.DisplayAlerts = True
exit for
End If
Next ws
End Sub
Bookmarks