bonjour
je voudrai de l'aide je viens de faire un code en vba excel et je voudrai que lors ce que je clique sur le bouton raffrechir la page se met a jour voici le code
merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 Function NbColor(ByRef Plage As Range, Couleur As Byte) As Long Dim c As Range Dim nb As Long nb = 0 For Each c In Plage If c.Interior.ColorIndex = Couleur Then nb = nb + 1 End If Next c NbColor = nb End Function Function NbColorSameAs(ByRef Plage As Range, ByRef Cellule As Range) As Long NbColorSameAs = NbColor(Plage, Cellule.Interior.ColorIndex) End Function Function NbColorText(ByRef Plage As Range, ByRef Couleur As Byte, text As String) As Long Dim c As Range Dim nb As Long nb = 0 For Each c In Plage If c.Interior.ColorIndex = Couleur And c.Value = text Then nb = nb + 1 End If Next c NbColorText = nb End Function Function NbColorAndTextSameAs(ByRef Plage As Range, ByRef Cellule As Range) As Long NbColorAndTextSameAs = NbColorText(Plage, Cellule.Interior.ColorIndex, Cellule.Value) End Function
Partager