timesareGMT
New Member
- Joined
- Aug 19, 2011
- Messages
- 26
Hi all,
Here I have a difficulty of running macro in a password protected worksheet.
The VBA code is that:
Sub Checker()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
Dim r As Long, cb As CheckBox<o></o>
<o></o>
Set cb = ActiveSheet.CheckBoxes(Application.Caller)<o></o>
r = Range(cb.LinkedCell).Row + 11<o></o>
<o></o>
Sheets("Report Layout").Rows(r).Hidden = cb.Value = xlOff<o></o>
<o></o>
End Sub<o></o>
<o></o>
<o></o>
<o>When I run the above macro under the pw protected condition, the following message appears: </o>
<o></o>
<o>Run-time error '1004': </o>
<o></o>
<o>Unable to set the Hidden property of the Range class </o>
<o></o>
<o></o>
<o>Is there a solution to get it fixed? </o>
<o></o>
<o>Thanks. </o>
<o></o>
<o></o>
<o></o>
Here I have a difficulty of running macro in a password protected worksheet.
The VBA code is that:
Sub Checker()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
Dim r As Long, cb As CheckBox<o></o>
<o></o>
Set cb = ActiveSheet.CheckBoxes(Application.Caller)<o></o>
r = Range(cb.LinkedCell).Row + 11<o></o>
<o></o>
Sheets("Report Layout").Rows(r).Hidden = cb.Value = xlOff<o></o>
<o></o>
End Sub<o></o>
<o></o>
<o></o>
<o>When I run the above macro under the pw protected condition, the following message appears: </o>
<o></o>
<o>Run-time error '1004': </o>
<o></o>
<o>Unable to set the Hidden property of the Range class </o>
<o></o>
<o></o>
<o>Is there a solution to get it fixed? </o>
<o></o>
<o>Thanks. </o>
<o></o>
<o></o>
<o></o>