Macro effacer
Résolu/Fermé
slim.029
Messages postés
2
Date d'inscription
mercredi 30 juillet 2008
Statut
Membre
Dernière intervention
20 février 2015
-
Modifié par slim.029 le 20/02/2015 à 16:36
slim.029 - 20 févr. 2015 à 18:05
slim.029 - 20 févr. 2015 à 18:05
A voir également:
- Macro effacer
- Macro word - Guide
- Macro logiciel - Télécharger - Organisation
- Telecharger macro convertir chiffre en lettre excel - Télécharger - Tableur
- Effacer les cookies - Guide
- Macro recorder - Télécharger - Confidentialité
1 réponse
Mike-31
Messages postés
18318
Date d'inscription
dimanche 17 février 2008
Statut
Contributeur
Dernière intervention
26 avril 2024
5 078
20 févr. 2015 à 16:39
20 févr. 2015 à 16:39
Bonjour,
Si la colorisation des valeurs est manuelle, essaye comme cela pour effacer les valeurs de couleur rouge et rétablir la couleur de police automatique
Private Sub CommandButton21_Click()
Dim Cell, Plage As Range, Ws As Worksheet, NbLig As Long
For Each Ws In ThisWorkbook.Worksheets
NbLig = Ws.[A65536].End(xlUp).Row
Set Plage = Ws.Range("A2:G" & NbLig)
For Each Cell In Plage
If Cell.Font.ColorIndex = 3 Then Cell.ClearContents
If Cell.Font.ColorIndex = 3 Then Cell.Font.ColorIndex = xlAutomatic
Next Cell
Next Ws
End Sub
Si la colorisation des valeurs est manuelle, essaye comme cela pour effacer les valeurs de couleur rouge et rétablir la couleur de police automatique
Private Sub CommandButton21_Click()
Dim Cell, Plage As Range, Ws As Worksheet, NbLig As Long
For Each Ws In ThisWorkbook.Worksheets
NbLig = Ws.[A65536].End(xlUp).Row
Set Plage = Ws.Range("A2:G" & NbLig)
For Each Cell In Plage
If Cell.Font.ColorIndex = 3 Then Cell.ClearContents
If Cell.Font.ColorIndex = 3 Then Cell.Font.ColorIndex = xlAutomatic
Next Cell
Next Ws
End Sub
20 févr. 2015 à 18:05
slim.029