checkbox

R

ranswert

I can't get the linkedcell to work on my checkbox. This is the procedure:

Sub addcheckbox()
Dim cboxname As Integer
Dim cell As Range
Dim chk As Excel.CheckBox
Set cell = ActiveCell
Set chk = cell.Parent.CheckBoxes.Add(cell.Left, cell.Top, cell.Width,
cell.Height)
chk.Height = cell.Height - 1.5
cboxname = ActiveCell.EntireRow.Cells(8)
chk.Characters.Text = "Add to Estimate"
chk.Name = "Checkbox" & cboxname
chk.Value = xlOff
chk.LinkedCell = ActiveCell.EntireRow.Cells(3)
ActiveCell.Select

End Sub
 
V

Vergel Adriano

You need to set it to the cell address:

chk.LinkedCell = ActiveCell.EntireRow.Cells(3).Address
 

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