M
Matt Jensen
Howdy
I'm having some problems with my file created in xl2002 when opened in xl 97
in that I am getting a variety of "Unable to set the ..." errors, such as
"Unable to set the locked property of the Range class" or "Unable to set the
hidden property of the range class".
I did some Goggle groups searches on this group, and the latter error (which
was the error I encountered) seemed to be because I was trying to hide 5
rows that were either locked or protected or both. When I selected the
entire sheet and 'unlocked' the cells (as well as the fact that the sheet
wasn't protected anyway) and tried again with my procedure to hide the rows
and I still got the same error, I came across this procedure
Private Sub CommandButton3_Click()
Dim myDoc As Worksheet
Dim cel As Range
Set myDoc = ActiveSheet
myDoc.Unprotect
For Each cel In myDoc.UsedRange
cel.Locked = False
Next
End Sub
which I tried to use to clear any locking or protection problems, but now
I'm getting the first error I listed above.
What's going on?
Thanks
Matt
I'm having some problems with my file created in xl2002 when opened in xl 97
in that I am getting a variety of "Unable to set the ..." errors, such as
"Unable to set the locked property of the Range class" or "Unable to set the
hidden property of the range class".
I did some Goggle groups searches on this group, and the latter error (which
was the error I encountered) seemed to be because I was trying to hide 5
rows that were either locked or protected or both. When I selected the
entire sheet and 'unlocked' the cells (as well as the fact that the sheet
wasn't protected anyway) and tried again with my procedure to hide the rows
and I still got the same error, I came across this procedure
Private Sub CommandButton3_Click()
Dim myDoc As Worksheet
Dim cel As Range
Set myDoc = ActiveSheet
myDoc.Unprotect
For Each cel In myDoc.UsedRange
cel.Locked = False
Next
End Sub
which I tried to use to clear any locking or protection problems, but now
I'm getting the first error I listed above.
What's going on?
Thanks
Matt