un internaute
XLDnaute Impliqué
Bonjour le forum
option explicit et moi ça fait deux!!!
Je n'avais pas pris l'habitude de le faire et quelques fois ça bug mais j'y arrive mais là je n'y arrive pas ou faut pas le mettre
	
	
	
	
	
		
	
		
			
		
		
	
				
			option explicit et moi ça fait deux!!!
Je n'avais pas pris l'habitude de le faire et quelques fois ça bug mais j'y arrive mais là je n'y arrive pas ou faut pas le mettre
		VB:
	
	
	Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  If Not Intersect(Range("H4:H15"), Target) Is Nothing And Target.Count = 1 Then
      Target = Int(Range("E" & Target.Row) - Sheets("Année 2016").Range("E16"))
      Cancel = True
    End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
  If Not Intersect(Range("E4:E15"), Target) Is Nothing And Target.Count = 1 Then
    If IsNumeric(Target) And Target <> "" Then
      Application.EnableEvents = False
      Target.Formula = "=" & Target & "+'Année 2016'!E16"
      Application.EnableEvents = True
    End If
    Cancel = True
  End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)         'Lancer la macro DeplacerCommentaires.Cliquer sur cellule d'origine des commentaires => OK puis cellule de Destination => OK
  If Target.Count > 1 Then Exit Sub
  If Intersect(Target, [A2:A16], [F2:F16]) Is Nothing Then Exit Sub   'Jouer sur [[A2:A16], [F2:F16] pour la plage des commentaires à déplacer
  If Not Target.Comment Is Nothing Then
Cancel = True
End If
End Sub 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		