Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As
Boolean)
If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then
Cancel = True
Target.Font.Name = "Wingdings"
Target.HorizontalAlignment = xlCenter
If Target.Value = "" Then
Target.Value = "þ"
Else
Target.Value = ""
End If
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As Boolean) If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then Cancel = True Target.Font.Name = "Wingdings" Target.HorizontalAlignment = xlCenter If Target.Value = "" Then Target.Value = "þ" Else Target.Value = "" End If End If End Sub
Salut,
Essaie comme ceci:
If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Or _
Not (Intersect(Target, Range("C3:C16")) Is Nothing) Then
Michel
Bonjour,
cette macro permet en double cliquant dans les cellules A3:A16 de mettre une
croix.
Je ne maîtrise pas suffisamment le langage pour demander à ce que cela
fonctionne sur A3:A16 ou C3:C16 (la colonne B n'étant pas concernée...)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As
Boolean)
If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then
Cancel = True
Target.Font.Name = "Wingdings"
Target.HorizontalAlignment = xlCenter
If Target.Value = "" Then
Target.Value = "þ"
Else
Target.Value = ""
End If
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As Boolean) If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then Cancel = True Target.Font.Name = "Wingdings" Target.HorizontalAlignment = xlCenter If Target.Value = "" Then Target.Value = "þ" Else Target.Value = "" End If End If End Sub
Nicolas B.
Salut,
Remplace la deuxième ligne par : If Not (Intersect(Target, union(Range("A3:A16"),(Range("B3:B16"))) _ Is Nothing) Then
(pas testé).
A+ Nicolas B.
Bonjour,
cette macro permet en double cliquant dans les cellules A3:A16 de mettre une croix.
Je ne maîtrise pas suffisamment le langage pour demander à ce que cela fonctionne sur A3:A16 ou C3:C16 (la colonne B n'étant pas concernée...)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As Boolean) If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then Cancel = True Target.Font.Name = "Wingdings" Target.HorizontalAlignment = xlCenter If Target.Value = "" Then Target.Value = "þ" Else Target.Value = "" End If End If End Sub
Salut,
Remplace la deuxième ligne par :
If Not (Intersect(Target, union(Range("A3:A16"),(Range("B3:B16"))) _
Is Nothing) Then
(pas testé).
A+
Nicolas B.
Bonjour,
cette macro permet en double cliquant dans les cellules A3:A16 de mettre une
croix.
Je ne maîtrise pas suffisamment le langage pour demander à ce que cela
fonctionne sur A3:A16 ou C3:C16 (la colonne B n'étant pas concernée...)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As
Boolean)
If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then
Cancel = True
Target.Font.Name = "Wingdings"
Target.HorizontalAlignment = xlCenter
If Target.Value = "" Then
Target.Value = "þ"
Else
Target.Value = ""
End If
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As Boolean) If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then Cancel = True Target.Font.Name = "Wingdings" Target.HorizontalAlignment = xlCenter If Target.Value = "" Then Target.Value = "þ" Else Target.Value = "" End If End If End Sub
Philippe de PARIS
Merci de votre aide,
ça fonctionne !
Phil.
"Philippe de PARIS" a écrit dans le message de news:
Bonjour,
cette macro permet en double cliquant dans les cellules A3:A16 de mettre une croix.
Je ne maîtrise pas suffisamment le langage pour demander à ce que cela fonctionne sur A3:A16 ou C3:C16 (la colonne B n'étant pas concernée...)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As Boolean) If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then Cancel = True Target.Font.Name = "Wingdings" Target.HorizontalAlignment = xlCenter If Target.Value = "" Then Target.Value = "þ" Else Target.Value = "" End If End If End Sub
Merci de votre aide,
ça fonctionne !
Phil.
"Philippe de PARIS" <philippe.geainospamsvp@laposte.net> a écrit dans le
message de news: uYYsRB3lFHA.3256@tk2msftngp13.phx.gbl...
Bonjour,
cette macro permet en double cliquant dans les cellules A3:A16 de mettre
une croix.
Je ne maîtrise pas suffisamment le langage pour demander à ce que cela
fonctionne sur A3:A16 ou C3:C16 (la colonne B n'étant pas concernée...)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As
Boolean)
If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then
Cancel = True
Target.Font.Name = "Wingdings"
Target.HorizontalAlignment = xlCenter
If Target.Value = "" Then
Target.Value = "þ"
Else
Target.Value = ""
End If
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,Cancel As Boolean) If Not (Intersect(Target, Range("A3:A16")) Is Nothing) Then Cancel = True Target.Font.Name = "Wingdings" Target.HorizontalAlignment = xlCenter If Target.Value = "" Then Target.Value = "þ" Else Target.Value = "" End If End If End Sub