View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default if a checkbox is checked then...

I assume the checkbox is on a sheet. Richt click on
the sheet tab and click "View Code" to open the sheet
code module. Then copy and past the code into the code
window. Also assumed you named the checkbox as shown.


Private Sub chkEligable_Click()
If chkEligable.Value = True Then
Range("Retirement") = 0.15*Range("Annual_Salary").Value
Else
Range("Retirement") = 0
End Sub



"tkw" wrote in message
...
I am trying to write a code that will allow me to multiple one range by .15
- IF THE CHECKBOX IS CHECKED - and place the sum in another range. If not
checked then it will equal 0


If chkEligable.Value = True Then

Range ("Retirement") will equal .15 times Range ("Annual_Salary")

Else

Range("Retirement").Value = 0
Thanks