Bonjour à tous,
Il y a quelques temps, un gentil membre m'a aidé et je le remercie beaucoup, a concevoir ce code, et j'aimerais faire une correction, mais je ne sais pas ou introduire cette correction.
En fait, il s'agit d'incorporer une information dans le InputBox.
Voici le texte ci-dessus en rouge
Merci de votre aide
A+++
'("Indiquer le nom de la société... ", "Nouveau membre")
'Fonction color les ligne et affiche dans cellule A1
Private Sub Worksheet_BeforeDoubleClick(ByVal c As Range, Cancel As Boolean)
Dim qui As String
Application.ScreenUpdating = False
Cancel = True
On Error Resume Next
If c.Address = "$A$1" Then
qui = InputBox(qui)
If qui = "" Then Exit Sub
With Range("a"): .Interior.ColorIndex = xlNone: .AutoFilter Field:=1, Criteria1:=qui: End With
Range("a265000").SpecialCells(xlCellTypeVisible).SpecialCells(xlCellTypeConstants).Interior.ColorIndex = 4
Range("a265000").SpecialCells(xlCellTypeVisible).SpecialCells(xlCellTypeFormulas).Interior.ColorIndex = 4
Range("a1") = qui & " : " & Application.Subtotal(3, [a:a]) - 1 & Chr(10) & Application.Subtotal(9, [d:d]) & " CHF"
Cells.AutoFilter
End If
End Sub
'Annuler la fonction
Private Sub Worksheet_BeforeRightClick(ByVal c As Range, Cancel As Boolean)
If c.Address = "$A$1" Then Cancel = True: c = "Sociétés": [a].Interior.ColorIndex = xlNone
End Sub
Il y a quelques temps, un gentil membre m'a aidé et je le remercie beaucoup, a concevoir ce code, et j'aimerais faire une correction, mais je ne sais pas ou introduire cette correction.
En fait, il s'agit d'incorporer une information dans le InputBox.
Voici le texte ci-dessus en rouge
Merci de votre aide
A+++
'("Indiquer le nom de la société... ", "Nouveau membre")
'Fonction color les ligne et affiche dans cellule A1
Private Sub Worksheet_BeforeDoubleClick(ByVal c As Range, Cancel As Boolean)
Dim qui As String
Application.ScreenUpdating = False
Cancel = True
On Error Resume Next
If c.Address = "$A$1" Then
qui = InputBox(qui)
If qui = "" Then Exit Sub
With Range("a"): .Interior.ColorIndex = xlNone: .AutoFilter Field:=1, Criteria1:=qui: End With
Range("a265000").SpecialCells(xlCellTypeVisible).SpecialCells(xlCellTypeConstants).Interior.ColorIndex = 4
Range("a265000").SpecialCells(xlCellTypeVisible).SpecialCells(xlCellTypeFormulas).Interior.ColorIndex = 4
Range("a1") = qui & " : " & Application.Subtotal(3, [a:a]) - 1 & Chr(10) & Application.Subtotal(9, [d:d]) & " CHF"
Cells.AutoFilter
End If
End Sub
'Annuler la fonction
Private Sub Worksheet_BeforeRightClick(ByVal c As Range, Cancel As Boolean)
If c.Address = "$A$1" Then Cancel = True: c = "Sociétés": [a].Interior.ColorIndex = xlNone
End Sub