Check box macros
Dave,
You are amazing! Just what I was looking for :) Thanks so much!!!
"Dave Peterson" wrote:
Private Sub CheckBox1_Click()
If me.CheckBox1.Value = True Then
me.range("A1").Value = 10.5
Else
me.range("a1").Value = 2.5
End If
End Sub
I like to qualify the objects (both the checkbox and the range), but that wasn't
the real problem.
me.cells(1,1).value = 10.5
would have worked ok, too.
Sunlover wrote:
Hi Roger,
Thanks for the quick response. However, below is exactly what I entered,
but an error keeps popping up that says: Compile Error: Sub or Function not
defined1:
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
cell(A1).Value = 10.5
Else
cell(A1).Value = 2.5
End If
End Sub
Any suggestions?
"Roger Converse" wrote:
It would work something like this:
if checkbox1.value = true then
cell.(A1).value = $10.50
else
cell(A1).value = 2.50
end if
HTH
Thanks,
Roger
"Sunlover" wrote:
Hi there,
On a form if a checkbox is selected (TRUE) then I want the answer in A1 to
be $10.50. If not checked (FALSE) I want the answer in A1to be $2.50. How
do I do this?
Thanks in advance!
--
Dave Peterson
|