Te l' avevo detto che era la penultima versione della macro; prova a modificare la terza riga nella Worksheet_SelectionChange in
If ActiveCell.Address = ACelAd Then ACelAd = "": Exit Sub
Sara' l' ultima?
Ciao
Moderatori: Anthony47, Flash30005
Public Preced As Boolean, ACelAd As String
Private Sub Worksheet_Change(ByVal Target As Range)
CheckArea = "D1:D40" '<< L' area da bloccare
If Intersect(Target, Range(CheckArea)) Is Nothing Then Exit Sub
If Preced Then
Application.EnableEvents = False
Application.Undo: ACelAd = ActiveCell.Range("A1").Address
MsgBox ("Vietato modificare la cella " & Target.Address)
Application.EnableEvents = True
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If ActiveCell.Address = ACelAd Then ACelAd = "": Exit Sub
On Error Resume Next
ACelAd = ""
If IsError(Target.Value) Then
Preced = False
Else
If Target.Value <> 0 Then Preced = True Else Preced = False
End If
End Sub
If Target.Count > 1 Then Preced = True: Exit Sub
Private Sub Worksheet_Change(ByVal Target As Range)
CheckArea = "D1:D40" '<< L' area da bloccare
ombra = "Foglio3" '<<< Il foglio usato come "Ombra"
Sheets(ombra).Visible = False
If Intersect(Target, Range(CheckArea)) Is Nothing Then Exit Sub
TargAd = Target.Address
For Each Cella In Range(CheckArea)
If Cella <> ThisWorkbook.Sheets(ombra).Range(Cella.Address) Then
If ThisWorkbook.Sheets(ombra).Range(Cella.Address).Value = "" Then
ThisWorkbook.Sheets(ombra).Range(Cella.Address).Value = Cella.Value
Else
Cella.Value = ThisWorkbook.Sheets(ombra).Range(Cella.Address).Value
Cella.Select
MsgBox ("Proibito modificare la cella " & Cella.Address)
End If
End If
Next Cella
End Sub
Torna a Applicazioni Office Windows
colora parte di frase/ Parola in stessa cella Autore: raimea |
Forum: Applicazioni Office Windows Risposte: 6 |
Inserire 2 valori nella stessa cella Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 2 |
Incolla prendendo riferimento da cella esterna Autore: scanacc |
Forum: Applicazioni Office Windows Risposte: 4 |
Visitano il forum: Nessuno e 87 ospiti