Thread: Checkbox Help
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Checkbox Help

I am assuming that you got your checkbox from the control toolbox and not the
forms toolbar. You need to reference the sheet

Private Sub CommandButton1_Click()
Sheet1.CheckBox1.Value = True
End Sub

for example... HTH

" wrote:

Is there a way in code to check a checkbox on an excel spreadsheet when
a command button is clicked? i tried the following but it didnt seem to
work: it gave an error saying "Object required"??

Sub SendAll_Click ()

If CheckBox1.Value = 0 then
CheckBox1.Value = 1
End if

End Sub

Any ideas on what i am may be doing wrong???