
Originally Posted by
yudlugar
Nope. Do you h.....
There is more code; here you go;
Private Sub Worksheet_Activate()
Application.Run Database!CalcMostRecentBooking
End Sub
Private Sub worksheet_change(ByVal target As Range)
If Not Intersect(target, Range("T:T")) Is Nothing Then
Range("CK" & target.Row) = Range("CK" & target.Row) + target
End If
Dim lngCol As Long
If target.Column > 1 And target.Column < 7 Then
ActiveSheet.Unprotect
Application.EnableEvents = False
With Cells(target.Row, Column + 95)
.Value = Environ("Username") & " " & Now
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End With
Application.EnableEvents = True
End If
If target.Column > 17 And target.Column < 24 Then
ActiveSheet.Unprotect
Application.EnableEvents = False
With Cells(target.Row, Column + 96)
.Value = Environ("Username") & " " & Now
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End With
Application.EnableEvents = True
End If
If target.Column > 30 And target.Column < 38 Then
ActiveSheet.Unprotect
Application.EnableEvents = False
With Cells(target.Row, Column + 97)
.Value = Environ("Username") & " " & Now
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End With
Application.EnableEvents = True
End If
If target.Column > 43 And target.Column < 51 Then
ActiveSheet.Unprotect
Application.EnableEvents = False
With Cells(target.Row, Column + 98)
.Value = Environ("Username") & " " & Now
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End With
Application.EnableEvents = True
End If
If target.Column > 56 And target.Column < 64 Then
ActiveSheet.Unprotect
Application.EnableEvents = False
With Cells(target.Row, Column + 99)
.Value = Environ("Username") & " " & Now
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End With
Application.EnableEvents = True
End If
If target.Column > 69 And target.Column < 77 Then
ActiveSheet.Unprotect
Application.EnableEvents = False
With Cells(target.Row, Column + 100)
.Value = Environ("Username") & " " & Now
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True
End With
Application.EnableEvents = True
End If
End Sub
I might have put it in the wrong place?
Bookmarks