A
Alguiche
Guest
Bonjour à tous,
J'ai chargé un code me permettant par un double click de mettre un X dans des cellules. ça marche mais je voudrais le limiter à une plage donnée 'f5:z79' . J'ai essayé en modifiant mon code, mais pas de changement.
Merci à la bonne âme qui pourra m'aider
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim Isect As Range
Set Isect = Application.Intersect(Target, Range('f5:z79'))
On Error Resume Next
If IsEmpty(ActiveCell.Value) Then
ActiveCell.Value = 'X'
ElseIf ActiveCell.Value = 'X' Then
ActiveCell.Value = ''
End If
Cancel = True
End Sub
Bon dimanche
Al [file name=synthese_fontaines_050911.zip size=13821]http://www.excel-downloads.com/components/com_simpleboard/uploaded/files/synthese_fontaines_050911.zip[/file]
J'ai chargé un code me permettant par un double click de mettre un X dans des cellules. ça marche mais je voudrais le limiter à une plage donnée 'f5:z79' . J'ai essayé en modifiant mon code, mais pas de changement.
Merci à la bonne âme qui pourra m'aider
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim Isect As Range
Set Isect = Application.Intersect(Target, Range('f5:z79'))
On Error Resume Next
If IsEmpty(ActiveCell.Value) Then
ActiveCell.Value = 'X'
ElseIf ActiveCell.Value = 'X' Then
ActiveCell.Value = ''
End If
Cancel = True
End Sub
Bon dimanche
Al [file name=synthese_fontaines_050911.zip size=13821]http://www.excel-downloads.com/components/com_simpleboard/uploaded/files/synthese_fontaines_050911.zip[/file]