Check Box/Tick Box

Q

Qull666

I acquired this from one of BP's post. Help is required to fine tune the
codes. Thanks.


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Const WS_RANGE As String = "E02:E22"

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Value <> "X" Then
..Font.Name = "Arial"
..Value = "X"

Range("B7").Select
ActiveCell.FormulaR1C1 = _

"=IF(ISERROR(VLOOKUP(""X"",R[-2]C[3]:R[15]C[12],10,FALSE)),"""",VLOOKUP(""X"",R[-2]C[3]:R[15]C[12],10,FALSE))"
Range("B7").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("B3").Select
'.Offset(2, -3).FomulaFormat = ""

Else
..Value = ""
'.Offset(0, 1).Value = ""
Range("B7").Select
Selection.ClearContents
Range("B3").Select

End If
End With
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top