tick box, how to set up
Hi!
Here's some code by Bob Phillips and tweaked by Dave Peterson that does what
you want:
This procedure let's you click on a cell in a range (defined in the code)
and places a "checkmark" in
that cell.
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myHeight As Double
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
With Target
If .Value = "a" Then
.Value = ""
Else
myHeight = .EntireRow.RowHeight
.Value = "a"
.Font.Name = "Marlett"
.EntireRow.RowHeight = myHeight
End If
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub
This is sheet code.
Right click the sheet tab and paste into the window that opens.
Then, to use the checkmark in an IF formula you simply need to test the cell
to see if it's empty or not.
Biff
"Tiddler" wrote in message
...
Hi can anyone explain (if possible) how to set up a tick box?
I would like to left cliick on the mouse in a cell (to put tick in) and
then
use this tick in a IF statement on another.
Thnaks again Matt
|