Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Range("B1").CurrentRegion.Resize(1, Range("B1").CurrentRegion.Columns.Count).Name = "plage2"
If Not Intersect([plage2], Target) Is Nothing Then
If ActiveCell.Value = "?" Then
ActiveCell.EntireColumn.Delete Shift:=xlToLeft
Else
ActiveCell.EntireColumn.Insert Shift:=xlToRight
ActiveCell.Value = "?"
End If
End If
Cancel = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("B1").CurrentRegion.Resize(1, Range("B1").CurrentRegion.Columns.Count).Name = "plage2"
On Error Resume Next
Range("ColChoix2").Interior.ColorIndex = xlNone
If Not Intersect(Target, Range("plage2")) Is Nothing Then
test = Chr(64 + Target.Column)
test1 = Cells(65536, test).End(xlUp).Address
Feuil1.Range(test & "2", test1).Name = "colchoix"
Range("ColChoix2").Interior.ColorIndex = 6
ActiveSheet.Shapes("Group 36").Visible = True
ActiveSheet.Label1.Caption = Target.Value
Else
ActiveSheet.Shapes("Group 36").Visible = False
End If
End Sub