about protection

P

pmss

Hello

I have made one excel sheet using Macro code for hide some rows with check
box. But i could not protect the sheet. If i protect it , check box doesnot
work. Can you help me to protect sheet .

pmss
 
B

Bob Phillips

Do you mean that the checkbox doesn't work, or the code behind it?

If the former, either check the 'Edit objects' option in the protection
dialog, or use a checkbox from the forms toolbar.

If the latter, unprotect the sheet before your code, then re-protect it
afterwards.

--
---
HTH

Bob


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

pmss

Bob Phillips said:
Do you mean that the checkbox doesn't work, or the code behind it?

If the former, either check the 'Edit objects' option in the protection
dialog, or use a checkbox from the forms toolbar.

If the latter, unprotect the sheet before your code, then re-protect it
afterwards.

--
---
HTH

Bob


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






Thanks.

Still does not work. I have used following codes for check box.
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then

Rows("18:39").Hidden = False
Else
Rows("18:39").Hidden = True

End If

End Sub

I want to protect this sheet. When i protect the sheet the check box doesnot
work, it gives some error.

Pmss
 
B

Bob Phillips

What doesn't work, I gave many suggestions? You need to be more explicit.

--
---
HTH

Bob


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

pmss

hi
check box doesnot work, when i protect the sheet. It gives Run time error
1004.
Unable to set the hidden property of the Range class.
pmss
 
B

Bob Phillips

So did you read my first post?

--
---
HTH

Bob


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

Dave Peterson

Another thing to check...

Do you have a linkedcell to that checkbox? And is that linkedcell locked and
located on a protected worksheet?

Unlock that cell (format|cells|protection tab in xl2003)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top