Private Sub Worksheet_Change(ByVal Target As Range)
Dim cella As Excel.Range
Application.EnableEvents = False
For Each cella In Range("D4:CR76")
With cella
If Not .Value = vbEmpty Then
.Value = UCase(.Value)
End If
End With
Next
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Activate()
Dim Riga As Integer
Dim Col As Integer
ActiveSheet.Unprotect "password"
Range("R4:NZ32").Interior.ColorIndex = xlNone
For Col = 18 To 390
If Cells(1, Col) = 6 Or Cells(1, Col) = 7 Then
For Riga = 4 To 32
Cells(Riga, Col).Interior.ColorIndex = 15
Next
End If
Next
ActiveSheet.Protect "password", AllowFiltering:=True
End Sub
Private Sub Workbook_Open()
Dim m As Integer
Dim d As Integer
Dim I As Integer
Dim C As Integer
m = Month(Date)
d = Day(Date)
C = 0
For I = 1 To d
C = C + 3
Next
Sheets(m).Activate
Cells(4, C + 1).Activate
End Sub
|