worksheet protection excel 2000 vrs 2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a worksheet with the code below running on excel 2003.
The worksheet is protected with "select unlocked cells" and "formatt cells"
enabled.
When moved to excel 2000 the option for "formatt cells" fails.
Unsure how to correct this in excel 2000.
Any help would be a boon.

Dan


'----------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----------------------------------------------------------------
Cells.FormatConditions.Delete
With Target
..FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
..FormatConditions(1).Interior.ColorIndex = 6
End With

End Sub
 
Not completely sure, but I think that the option to select locked and
unlocked cells was not available on XL2000 as were 'allow AutoFilter' etc
and 'allow formatting cells'.
If so then that is the reason the code fails. I'm sure someone will confirm
or overturn this theory,
Regards,
Alan.
 
Hi Dan

Confirming Alan's post, Excel 2000 can not do that. Unless the user defines
the protection password, your code could unprotect - format - reprotect the
sheet.

You should develop these things in the eraliest version to be used,
otherwise you are coding blindfolded.

HTH. Best wishes Harald
 
When I was given this project I was told this was the oldest version I needed
to code for.
But Hey.
Thanks anyway.

Dan
 

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

Back
Top