Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
'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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofilter not working on protected sheet. | Excel Discussion (Misc queries) | |||
using autofilter in a shared protected workbook excel 2000? | Excel Discussion (Misc queries) | |||
Protected sheet and Autofilter? | Excel Programming | |||
How do I enable autofilter on a protected shared workbook? | Excel Discussion (Misc queries) | |||
Autofilter on protected workbook | Excel Discussion (Misc queries) |