Bonjour,
Le code suivant fonctionne très bien sous excel2003;mais pas sous excel2000.A la ligne 3 il marque "erreur 1004".
J'aurai besoin d'aide,car il s'agit principalement de fonction de test sur des cellules avec des conditions.
Merci de votre assistance,afin de modifier le code
Laplayast.
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
If ActiveSheet.Index < Sh.Index Then Exit Sub
If Sh.Cells.SpecialCells(xlCellTypeAllFormatConditions).Count = 0 Then Exit Sub
With Application
.EnableEvents = False
If .CountA(Sh.Cells.SpecialCells(xlCellTypeAllFormatConditions)) <> _
Sh.Cells.SpecialCells(xlCellTypeAllFormatConditions).Count Then
Sh.Activate
MsgBox "Faut tout remplir, mon gars!"
End If
.EnableEvents = True
End With
End Sub
Private Sub Workbook_Open()
For Each Sh In Sheets
Sh.Protect userInterfaceOnly:=True
Next Sh
Le code suivant fonctionne très bien sous excel2003;mais pas sous excel2000.A la ligne 3 il marque "erreur 1004".
J'aurai besoin d'aide,car il s'agit principalement de fonction de test sur des cellules avec des conditions.
Merci de votre assistance,afin de modifier le code
Laplayast.
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
If ActiveSheet.Index < Sh.Index Then Exit Sub
If Sh.Cells.SpecialCells(xlCellTypeAllFormatConditions).Count = 0 Then Exit Sub
With Application
.EnableEvents = False
If .CountA(Sh.Cells.SpecialCells(xlCellTypeAllFormatConditions)) <> _
Sh.Cells.SpecialCells(xlCellTypeAllFormatConditions).Count Then
Sh.Activate
MsgBox "Faut tout remplir, mon gars!"
End If
.EnableEvents = True
End With
End Sub
Private Sub Workbook_Open()
For Each Sh In Sheets
Sh.Protect userInterfaceOnly:=True
Next Sh