00 24/08/2022 13:49
Ciao a tutti.
Con questa macro posso modificare come formato solo le celle delle colonne
Range("C:C, D:D, E:E, F:F, G:G, H:H, I:I")
E' possibile modificarla perchè il collegamento ipertestuale sia possibile solo nella colonna C, ora è per le colonne impostate
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'------------------------------------------------------------------------------
   
Dim n As Long
Dim avviso As String
n = ActiveCell.Row
If n < 7 Then
'avviso = MsgBox("non puoi modificare questa cella!!!", vbOKOnly + vbCritical, "ATTENZIONE!")
ActiveSheet.Protect Password:="987654"
Exit Sub
End If
   
   
   
   If Not Intersect(Target, Range("C:C, D:D, E:E, F:F, G:G, H:H, I:I")) Is Nothing Then
        'ActiveSheet.Unprotect "987654"
        ActiveSheet.Protect Password:="987654", DrawingObjects:=True, Contents:=True, Scenarios:=True _
       , AllowFormattingCells:=True, AllowInsertingHyperlinks:=True, AllowFiltering:=True
    Else
        'ActiveSheet.Unprotect "987654"
        ActiveSheet.Protect Password:="987654", DrawingObjects:=True, Contents:=True, Scenarios:=True _
        , AllowFormattingCells:=False, AllowInsertingHyperlinks:=False, AllowFiltering:=True
    End If
                
 

End Sub