Sub copia()
Dim ws As Worksheet, Ur As Long, Rg As Long
Rg = 1 ' metti due per iniziare dalla riga2 in Storico
Application.ScreenUpdating = False
'Application.DisplayAlerts = False
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "Storico" Then ''qui il nome
With ws
Ur = ws.Range("A" & Rows.Count).End(xlUp).Row
If Rg + Ur > 1048576 Then MsgBox "Mancanza di righe, Esco dalla procedura": GoTo Fine
ws.Range("A1:J" & Ur).Copy ' casomai modificalo
Sheets("Storico").Range("A" & Rg).PasteSpecial
Rg = Rg + Ur
'ws.Delete 'Se desideri eliminare, devi attivare le due righe DisplayAlerts
End With
End If
Next ws
MsgBox "Fatto"
Fine:
Application.ScreenUpdating = True
'Application.DisplayAlerts = True
End Sub |