G
Guest
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?
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?