Uncheck a box

P

Pietro

Hi,

I want to uncheck the check box that exists a tab called "Quiz" once i
open the excel sheet,is it possible?
 
B

Bob Phillips

Private Sub Workbook_Open()
Worksheets("Quiz").CheckBoxes("Check Box 1").Value = False
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
P

Pietro

Thank you,
I tried the code but it gave me an error (RunTime error:1004 Unable to get
the Checkboxes property of the Woeksheet class)
 
B

Bob Phillips

Must be an Activex checkbox then, so try

Private Sub Workbook_Open()
Worksheets("Quiz").OLEObjects("CheckBox1").Object.Value = False
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
P

Pietro

Thanx alot,it works now

Bob Phillips said:
Must be an Activex checkbox then, so try

Private Sub Workbook_Open()
Worksheets("Quiz").OLEObjects("CheckBox1").Object.Value = False
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Top