S
Sean Stuber
How can i make variable A = the sheet name being searched. I tried the
code below and got an automation error. Using Activesheet.Name did not
work either.
Thanks in advance.
---
Dim sh As Worksheet
Application.DisplayAlerts = False
For Each sh In Worksheets
If sh.Range("G19").Value = 2 Then
If Worksheets.Count > 1 Then
sh.Delete
'\ Record deleted sheets ***
Row = Worksheets("Log").Range("DeleteRow").Cells(2, 1).Value
strDate = Format(Date, "mm-dd-yy") & " at " & Format(Time, "h:mm:ss")
A = sh.Name
Worksheets("Log").Cells(Row, 2) = A & " deleted " & strDate
End If
End If
Next sh
code below and got an automation error. Using Activesheet.Name did not
work either.
Thanks in advance.
---
Dim sh As Worksheet
Application.DisplayAlerts = False
For Each sh In Worksheets
If sh.Range("G19").Value = 2 Then
If Worksheets.Count > 1 Then
sh.Delete
'\ Record deleted sheets ***
Row = Worksheets("Log").Range("DeleteRow").Cells(2, 1).Value
strDate = Format(Date, "mm-dd-yy") & " at " & Format(Time, "h:mm:ss")
A = sh.Name
Worksheets("Log").Cells(Row, 2) = A & " deleted " & strDate
End If
End If
Next sh