Как сделать так, чтобы столбцы 6 (F) и 13 (M) принимали входные данные только при двойном щелчке, что означает, что он не должен принимать любые цифры, буквы или символы и даже кнопку «удалить», а двойной щелчок?
Вот код, который я разработал:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Checking whether target cell is in third column
Select Case Target.Column
Case 6, 13
If Not Intersect(Target, Range("F2:F13, M2:M13")) Is Nothing Then Cancel = True
'Prevent cell going into Edit Mode
Cancel = True
'Changing font type of the cell
Target.Font.Name = "Marlett"
'Checking if target cell value is blank then inserting tick
If Target = "" Then
Target = "a"
Else
MsgBox "You cannot modify the cell."
End If
End Select
End Sub