Hi All,
I can't figure this out. I have 2 ranges of cells that either contain an "X" or are empty "".
I made the script for the X to be on or off.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
.DisplayAlerts = False
End With
If Not Intersect(Target, Range("D31:F135")) Is Nothing Then
If Len(Trim(Target)) = 0 Then
Target.Value = "X"
Cancel = True
ElseIf UCase(Trim(Target)) = "X" Then
Target.ClearContents
Cancel = True
End If
End If
The only way i can clear the 2 other cells in columns D,E or F is:
If Target.Address = Range("D31").Address Then
Range("E31:F31").Value = ""
End If
If Target.Address = Range("E31").Address Then
Range("D31,F31").Value = ""
End If
If Target.Address = Range("F31").Address Then
Range("D31:E31").Value = ""
End If
I have 105 rows in range column D,E and F and another 105 rows in columns I,J and K, all in the same worksheet.
I get an error 28 out of stack because the script is too big (820 lines eek . There must be an easy way to solve this problem without using checkboxes?
The code has to activate on start so i have to put it in the worksheet.
Any suggestions are welcome
Thanks!
Bookmarks