Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Autofilter in protected workbook not working

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Autofilter in protected workbook not working


When the sheet object(in your case Build) is not found, you get a
runtime error 424 with the message as 'Object Required'.

Check it is a codename or name of worksheet.


Regards,
Shah Shailesh
http://in.geocities.com/shahshaileshs/
(Excel Add-ins Page)

*** Sent via Developersdex http://www.developersdex.com ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Autofilter in protected workbook not working

'Build' is the name of one worksheet. Checked everything. Could not find
source of problem yet.

"Shailesh Shah" wrote:


When the sheet object(in your case Build) is not found, you get a
runtime error 424 with the message as 'Object Required'.

Check it is a codename or name of worksheet.


Regards,
Shah Shailesh
http://in.geocities.com/shahshaileshs/
(Excel Add-ins Page)

*** Sent via Developersdex http://www.developersdex.com ***

  #4   Report Post  
Posted to microsoft.public.excel.programming
sgl sgl is offline
external usenet poster
 
Posts: 80
Default Autofilter in protected workbook not working

Go to the VBE and in the properties window of the "Build" worksheet and under
the Name field assign a "Code Name" to the worksheet as "Build". This will
work now. Otherwise the code you have entered in the Workbook_Open will ask
you for an Object .... Worksheets("Build") .... which you have not defined

Regards
SGL

"Rumpa Biswas" wrote:

'Build' is the name of one worksheet. Checked everything. Could not find
source of problem yet.

"Shailesh Shah" wrote:


When the sheet object(in your case Build) is not found, you get a
runtime error 424 with the message as 'Object Required'.

Check it is a codename or name of worksheet.


Regards,
Shah Shailesh
http://in.geocities.com/shahshaileshs/
(Excel Add-ins Page)

*** Sent via Developersdex http://www.developersdex.com ***

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Autofilter in protected workbook not working

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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Autofilter in protected workbook not working

Thanks. Thats right. I tried later by removing shared option. At that time
the VB code didn't return any error.

So, is it correct that 'Autofilter cannot be used in protected and shared
workbook in excel 2000'?
Is there any workaround for this?

"Dave Peterson" wrote:

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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Autofilter in protected workbook not working

Maybe you could add another worksheet that is nothing but formulas pointing back
to the protected worksheet.

Leave that worksheet unprotected and allow filtering there.

=if('sheet 99'!a1="","",'sheet 99'!a1)

Drag down and across as far as you need.



Rumpa Biswas wrote:

Thanks. Thats right. I tried later by removing shared option. At that time
the VB code didn't return any error.

So, is it correct that 'Autofilter cannot be used in protected and shared
workbook in excel 2000'?
Is there any workaround for this?

"Dave Peterson" wrote:

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


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofilter not working on protected sheet. parahumanoid[_2_] Excel Discussion (Misc queries) 1 November 1st 09 05:52 PM
using autofilter in a shared protected workbook excel 2000? Needing Help for excel! Excel Discussion (Misc queries) 1 August 1st 06 06:24 PM
Protected sheet and Autofilter? harpscardiff[_19_] Excel Programming 4 January 25th 06 05:58 PM
How do I enable autofilter on a protected shared workbook? Bungle Excel Discussion (Misc queries) 3 August 9th 05 02:33 AM
Autofilter on protected workbook Wes Excel Discussion (Misc queries) 1 January 20th 05 11:06 PM


All times are GMT +1. The time now is 05:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"