View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jamal[_3_] Jamal[_3_] is offline
external usenet poster
 
Posts: 2
Default How to locate Cell in which control resides

Hello,

I need help getting VBA to recognize the cell in which a checkbox
resides. Is there a way to know the cell position based on the
location of the control. The code I am using is:

With ActiveCell.Interior
If CheckBox1.Value = True Then
.Color = RGB(0, 255, 0)
Else
.Color = RGB(255, 0, 0)
End If
End With

I basically need to change the color of the cell based on whether the
control is checked or not.

Thanks very much in advance.