I'm trying to copy all records in between columns A:CB, through the last row. This is on sheets where I won't know what their name is, but I do know what it won't be. The following code isn't producing anything:
Code:
Sub CopyPaste_ClientSheets()
Dim ws As Worksheet
Dim LastRow As Long
For Each ws In Worksheets
If Not ws.Name = "Displays" And Not ws.Name = "Management" And Not ws.Name = "Summaries" _
And Not ws.Name = "Bios" And Not ws.Name = "Stats" And Not ws.Name = "Appt Tracker" _
And Not ws.Name = "Pymt Tracker" And Not ws.Name = "Variables" Then
LastRow = ws.Range("D" & ws.Rows.Count).End(xlUp).Row
If Len(ws.Range("A2").Value) = 0 Then
Exit Sub
Else
ws.Range("A1" & LastRow & ":CB" & LastRow).Copy
ws.Range("A1").PasteSpecial xlPasteValues
End If
End If
Application.CutCopyMode = False
Next ws
End Sub