Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, [A1]) Is Nothing Or Trim(Target) = "" Then Exit Sub
For Each sh In Worksheets
If LCase(sh.Name) = LCase([A1]) Then
Application.EnableEvents = False
[B1:L15].Copy Sheets([A1].Value).[B1]
Application.EnableEvents = True
MsgBox "La copia è avvenuta correttamente.", vbInformation, "Ok!"
[A1].Select
Exit Sub
End If
Next
MsgBox "Il foglio indicato in A1 " & Chr(34) & [A1] & Chr(34) & " non esiste!", vbCritical, "Attenzione"
[A1].Select
End Sub |