bonsoir, 🙂
est ce que quelqu'un a du temps à consacrer pour me corriger ce macro?
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells(16, 1) = StrConv(Cells(16, 1), 1) Cells(18, 1) = StrConv(Cells(18, 1), 1) Cells(17, 7) = StrConv(Cells(17, 7), 1) Private Sub Worksheet_SelectionChange(ByVal Target As Range) ' clic en dehors des tableaux pous effacer les lignes coloriées Range("A23:H" & Range("A65535").End(xlUp).Row).Interior.Pattern = xlNone ' Pour le tableau If Not Intersect(Target, Range("A23:H43")) Is Nothing And Target.Count = 1 Then Range("A23:H" & Range("A65535").End(xlUp).Row).Interior.Pattern = xlNone Range(Cells(Target.Row, 2), Cells(Target.Row, 8)).Interior.Color = RGB(200, 100, 150) End If End Sub Sub MasquerLignes() 'masquer les lignes à partir de la ligne 49 Range(Cells(49, 1), Cells(Rows.Count, 1)).EntireRow.Hidden = True
'masquer les colonnes à partir de la colonne H (ce qui correspond à la colonne 8) Range(Cells(1, 8), Cells(1, Columns.Count)).EntireColumn.Hidden = True End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) ' clic en dehors des tableaux pous effacer les lignes coloriées Range("A23:H" & Range("A65535").End(xlUp).Row).Interior.Pattern = xlNone ' Pour le tableau If Not Intersect(Target, Range("A23:H43")) Is Nothing And Target.Count = 1 Then Range("A23:H" & Range("A65535").End(xlUp).Row).Interior.Pattern = xlNone Range(Cells(Target.Row, 2), Cells(Target.Row, 8)).Interior.Color = RGB(200, 100, 150) End If End Sub
J'ai un message comme :
erreur de compilation
nom ambigui détecté Worksheet_SelectionChange
j'attends vos retour 🙂
a+
est ce que quelqu'un a du temps à consacrer pour me corriger ce macro?
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells(16, 1) = StrConv(Cells(16, 1), 1) Cells(18, 1) = StrConv(Cells(18, 1), 1) Cells(17, 7) = StrConv(Cells(17, 7), 1) Private Sub Worksheet_SelectionChange(ByVal Target As Range) ' clic en dehors des tableaux pous effacer les lignes coloriées Range("A23:H" & Range("A65535").End(xlUp).Row).Interior.Pattern = xlNone ' Pour le tableau If Not Intersect(Target, Range("A23:H43")) Is Nothing And Target.Count = 1 Then Range("A23:H" & Range("A65535").End(xlUp).Row).Interior.Pattern = xlNone Range(Cells(Target.Row, 2), Cells(Target.Row, 8)).Interior.Color = RGB(200, 100, 150) End If End Sub Sub MasquerLignes() 'masquer les lignes à partir de la ligne 49 Range(Cells(49, 1), Cells(Rows.Count, 1)).EntireRow.Hidden = True
'masquer les colonnes à partir de la colonne H (ce qui correspond à la colonne 8) Range(Cells(1, 8), Cells(1, Columns.Count)).EntireColumn.Hidden = True End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) ' clic en dehors des tableaux pous effacer les lignes coloriées Range("A23:H" & Range("A65535").End(xlUp).Row).Interior.Pattern = xlNone ' Pour le tableau If Not Intersect(Target, Range("A23:H43")) Is Nothing And Target.Count = 1 Then Range("A23:H" & Range("A65535").End(xlUp).Row).Interior.Pattern = xlNone Range(Cells(Target.Row, 2), Cells(Target.Row, 8)).Interior.Color = RGB(200, 100, 150) End If End Sub
J'ai un message comme :
erreur de compilation
nom ambigui détecté Worksheet_SelectionChange
j'attends vos retour 🙂
a+