The bad news is that if the workbook is shared, then you can't change the
protection of a worksheet--even just to add userinterfaceonly:=true.
(after you resolved if "Build" was the code name or should have been
Worksheets("build").)
Rumpa Biswas wrote:
Trying to use Autofilter in protected workbook for excel 2000. Used the
following code.
Private Sub Workbook_Open()
Build.Protect password:="AbCd13579", DrawingObjects:=True, _
contents:=True, Scenarios:=True, _
userinterfaceonly:=True
Build.EnableAutoFilter = True
End Sub
But getting a runtime error 424 with the message as 'Object Required'.
Steps I followed are -
1. Entered VB code, mentioned above, in 'thisworkbook' in VB editor.
2. Protect workbook with my own options and with password.
3. Tools -- Share and Protect workbook
Then I am getting the runtime error while opening the excel again.
Is there any workaround for this?
--
Dave Peterson