1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Private Sub Workbook_SheetBeforeDoubleClick(ByVal sh As Object, ByVal Target As Range, Cancel As Boolean)
' Interception du double click pour lancer la boîte de dialogue (replace DataValidation)
Dim rngValidation As Range
Dim txt As String
Dim ValidationType As Byte
With Target
' Check if Target is ValidateList
On Error Resume Next
ValidationType = .Validation.Type
On Error GoTo 0
If ValidationType = xlValidateList Then
txt = mStdUserForm.ImprovedDataValidation(usfImprovedDataValidation, .Validation.Formula1, .Value)
.Value = txt
Cancel = True
End If
End With
Set rngValidation = Nothing
End Sub |
Partager