Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to insert checkbox?

13 views
Skip to first unread message

Simon Woo

unread,
Sep 3, 2001, 2:57:56 AM9/3/01
to
I need to insert a checkbox into a cell, and make that
Cell Link to another cell. Would anybody happen to know
the functions/objects/properties needed to do this? It's
seems to hard to make the checkbox fit right into a cell
etc.

Would appreciate it anyone to point me to any online list
of functions and objects and properties? For example, I
tried something like

Worksheets("Sheet1").Cells(5, 3).Font.Size = 14

but when I type the first portion :

Worksheets("Sheet1").Cells(5, 3).

I am not guided with the following properties like Font...
Why is this so?

Thanks!

<< SiMoN >>

Dave Peterson

unread,
Sep 3, 2001, 8:41:47 AM9/3/01
to
For your first question, how about something like this (it uses the checkbox
from the forms toolbar):

Sub testme()

Dim mycell As Range

Set mycell = Range("B3")

On Error Resume Next
ActiveSheet.CheckBoxes("cb_" & mycell.Address(False, False)).Delete
On Error GoTo 0

With mycell
With ActiveSheet.CheckBoxes.Add(.Left, .Top, .Width, .Height)
.Name = "cb_" & mycell.Address(False, False)
.Caption = "test"
.LinkedCell = Range("a1").Address
End With
End With

End Sub


The second problem: Do you have the options turned on?

I use xl97sr2 and while in the VBE, under Tools|options|Editor, Auto List
Members and Auto Quick Info are both enabled.

Sometimes I use the options under Edit (Ctrl-J, Ctrl-Shift-J, etc) to see the
options if the intellisense has gotten confused by my typing.

Simon Woo wrote:


--

Dave Peterson
ec3...@msn.com

0 new messages