#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default checkbox

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

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default checkbox

You need to set it to the cell address:

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


--
Hope that helps.

Vergel Adriano


"ranswert" wrote:

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

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default checkbox

that was easy
Thank You

"Vergel Adriano" wrote:

You need to set it to the cell address:

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


--
Hope that helps.

Vergel Adriano


"ranswert" wrote:

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

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
checkbox jeradora Excel Worksheet Functions 1 December 8th 09 06:30 PM
How to have Checkbox A uncheck with checked Checkbox B Texas Aggie Excel Discussion (Misc queries) 3 July 20th 07 10:58 PM
link a checkbox in a sheet to a checkbox on a userform? Arjan Excel Programming 0 November 10th 06 01:37 PM
How do I link one checkbox to update another checkbox? Mike Excel Programming 3 April 28th 06 02:22 AM
checkbox on form reset from checkbox on sheet raw[_12_] Excel Programming 1 December 3rd 05 05:08 AM


All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"