View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default when select cell in range checkbox value is true_but how?

With your 3 ranges named "sel_X", "sel_Y" and "sel_Z",
paste following code in worksheet's code:

'-----------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
CheckBox1.Value = _
Not Intersect(Range("sel_X"), Target) Is Nothing
CheckBox2.Value = _
Not Intersect(Range("sel_Y"), Target) Is Nothing
CheckBox3.Value = _
Not Intersect(Range("sel_Z"), Target) Is Nothing
End Sub
'------------------

HTH
--
AP

"up2you" a écrit dans
le message de ...

Hi all,

I have 3 checkbox in sheet and i have 3 range name x, y and z.

what i want is,

when i *select any cell in x range checkbox1.value=true *is run,
when i *select any cell in y range checkbox2.value=true *is run,
when i *select any cell in z range checkbox3.value=true * is run.

what is the code for this operations?

thanks.....


--
up2you
------------------------------------------------------------------------
up2you's Profile:

http://www.excelforum.com/member.php...o&userid=33468
View this thread: http://www.excelforum.com/showthread...hreadid=532691