View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Checkbox and linkedcell question

I wouldn't bother.

I'd just check(!) the checkbox itself.

Private Sub TTWK1_Click()
If me.ttwk1.value = true then
'....



treesinger101 wrote:

I want to use the cell address of a checkbox's linked cell. How do I
reference it in VBA so I don't have to write the code over and over. I have
the location hardcoded now, but I have about 30 checkboxes.

Here is what I want to happen when I click any checkbox.

Private Sub TTWK1_Click()

If Cells(3, 2).Value = True Then
Cells(3, 1) = "=NOW()"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Else
Cells(3, 1) = ""
End If
End Sub

Thank you for any help.
--
Athena
Payroll Goddess


--

Dave Peterson