Re: how can I make an excel cell "mark" or "unmark" when clicked on?
- From: "Roger Govier" <roger@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 8 Jan 2006 08:43:37 -0000
Hi Rick
In addition to the method already posted, you could use something like
the following.
Private Sub AddCheckBoxes()
Dim c As Range, myRange As Range
Set myRange = Selection
For Each c In myRange.Cells
Active***.CheckBoxes.Add(c.Left, c.Top, c.Width,
c.Height).Select
With Selection
.LinkedCell = c.Address
.Characters.Text = ""
End With
With Selection.Font
.ColorIndex = 2
End With
Next
myRange.Select
End Sub
The ColorIndex part is just setting the font to be White, so that you
don't see the word TRUE when you select the click box.
The value of the underlying cell will be set to True when clciked, and
False when unclicked.
--
Regards
Roger Govier
"Rick" <Rick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B850FC8E-A9E7-4CC4-8729-7121F7183327@xxxxxxxxxxxxxxxx
> how can I make an excel cell "mark" or "unmark" when clicked on?
.
- Prev by Date: Re: Tax rates
- Next by Date: Re: Help with creating an exam book..
- Previous by thread: Re: how can I make an excel cell "mark" or "unmark" when clicked on?
- Next by thread: 'Fill-in ignores Data Validation settings!
- Index(es):