User Interface Protection Problem 
Author Message
 User Interface Protection Problem

I have a workbook with 3 worksheets in Excel 2000 under
Windows 98.

As part of the Workbook Open, I protect each worksheet
individually for contents = true and User Interface Only =
true.  I also set each worksheet to Visible = xlVeryHidden.

The user enters data through User Forms only.  The user
forms enter data onto the first two worksheets perfectly.

When the User Forms try to enter data onto the third
worksheet, a Run-Time Error '1004': The cell or chart you
are trying to change is protected .... dialog is presented.

The Microsoft Knowledge Base indicated that sometimes too
many Protects can cause problems, so I have checked the
entire project for "Protect" and the only place that it
occurs is in Workbook Open and the Workbook Close. I have
opened the Immediate window and checked the Protection
Mode of the Worksheet in question just before the code
tries to write to it and it comes back as "True"
indicating (I think) that the User Interface Only is set
to True.

Obviously, I can find no difference between the code for
the worksheets that work and the ones that don't work.

I am at a loss, any suggestions on where to look?



Fri, 21 May 2004 07:38:08 GMT  
 User Interface Protection Problem
Hi George:

If you post your code, it'll save people from trying to guess at exactly
where the problem might lie.
--
Regards,

Vasant.


Quote:
> I have a workbook with 3 worksheets in Excel 2000 under
> Windows 98.

> As part of the Workbook Open, I protect each worksheet
> individually for contents = true and User Interface Only =
> true.  I also set each worksheet to Visible = xlVeryHidden.

> The user enters data through User Forms only.  The user
> forms enter data onto the first two worksheets perfectly.

> When the User Forms try to enter data onto the third
> worksheet, a Run-Time Error '1004': The cell or chart you
> are trying to change is protected .... dialog is presented.

> The Microsoft Knowledge Base indicated that sometimes too
> many Protects can cause problems, so I have checked the
> entire project for "Protect" and the only place that it
> occurs is in Workbook Open and the Workbook Close. I have
> opened the Immediate window and checked the Protection
> Mode of the Worksheet in question just before the code
> tries to write to it and it comes back as "True"
> indicating (I think) that the User Interface Only is set
> to True.

> Obviously, I can find no difference between the code for
> the worksheets that work and the ones that don't work.

> I am at a loss, any suggestions on where to look?



Fri, 21 May 2004 07:58:15 GMT  
 User Interface Protection Problem
_There is a LOT of code associated with the User Forms so
I have included the relevant lines for the Workbook Open,
User Form that works (btnNextfrn_Click), User Form that
fails (btnNexCrs_Click, and Workbook Close.

 _____________
Private Sub Workbook_Open()

ShowView "Open"

On Error Resume Next

    ActiveWorkbook.Worksheets("Prep Front Nine").Protect _
        Password:="lINDy", _
        DrawingObjects:=False, _
        Contents:=True, _
        Scenarios:=False, _
        UserInterfaceOnly:=True

    ActiveWorkbook.Worksheets("Prep Back Nine").Protect _
        Password:="lINDy", _
        DrawingObjects:=False, _
        Contents:=True, _
        Scenarios:=False, _
        UserInterfaceOnly:=True

    ActiveWorkbook.Worksheets("Final Front Nine").Protect _
        Password:="lINDy", _
        DrawingObjects:=False, _
        Contents:=True, _
        Scenarios:=False, _
        UserInterfaceOnly:=True

    ActiveWorkbook.Worksheets("Prep Front Nine").Visible =
xlVeryHidden
    ActiveWorkbook.Worksheets("Prep Back Nine").Visible =
xlVeryHidden
    ActiveWorkbook.Worksheets("Final Front Nine").Visible
= xlVeryHidden
    ActiveWorkbook.Worksheets("Final Back Nine").Visible =
xlVeryHidden
    ActiveWorkbook.Worksheets("Temp").Visible =
xlVeryHidden
    ActiveWorkbook.Worksheets("Rating").Visible =
xlVeryHidden

End Sub

_______________

' This snippet of code works!

Private Sub btnNextfrn_Click()

    Set wsPrFr = ActiveWorkbook.Worksheets("Prep Front
Nine")

    Unload Me

    wsPrFr.Range("M1").Value = txtCourse.Value
End Sub
__________________________

This snippet of code gets the error message when it
reaches the last line of the snippet!

Private Sub btnNexCrs_Click()

    Set wsFiFr = ActiveWorkbook.Worksheets("Final Front
Nine")
    Set wsTemp = ActiveWorkbook.Worksheets("Temp")

    Unload Me

    wsTemp.Range("AL1").Value = txtDate.Value
' fails on above line
End Sub
________________

Quote:
>-----Original Message-----
>Hi George:

>If you post your code, it'll save people from trying to
guess at exactly
>where the problem might lie.
>--
>Regards,

>Vasant.



>> I have a workbook with 3 worksheets in Excel 2000 under
>> Windows 98.

>> As part of the Workbook Open, I protect each worksheet
>> individually for contents = true and User Interface
Only =
>> true.  I also set each worksheet to Visible =
xlVeryHidden.

>> The user enters data through User Forms only.  The user
>> forms enter data onto the first two worksheets
perfectly.

>> When the User Forms try to enter data onto the third
>> worksheet, a Run-Time Error '1004': The cell or chart
you
>> are trying to change is protected .... dialog is
presented.

>> The Microsoft Knowledge Base indicated that sometimes
too
>> many Protects can cause problems, so I have checked the
>> entire project for "Protect" and the only place that it
>> occurs is in Workbook Open and the Workbook Close. I
have
>> opened the Immediate window and checked the Protection
>> Mode of the Worksheet in question just before the code
>> tries to write to it and it comes back as "True"
>> indicating (I think) that the User Interface Only is set
>> to True.

>> Obviously, I can find no difference between the code for
>> the worksheets that work and the ones that don't work.

>> I am at a loss, any suggestions on where to look?

>.



Fri, 21 May 2004 08:21:35 GMT  
 User Interface Protection Problem
Hi George:

I don't see in your code where UserInterfaceOnly is set to True for the
worksheet "Temp".
--
Regards,

Vasant.


Quote:
> _There is a LOT of code associated with the User Forms so
> I have included the relevant lines for the Workbook Open,
> User Form that works (btnNextfrn_Click), User Form that
> fails (btnNexCrs_Click, and Workbook Close.

>  _____________
> Private Sub Workbook_Open()

> ShowView "Open"

> On Error Resume Next

>     ActiveWorkbook.Worksheets("Prep Front Nine").Protect _
>         Password:="lINDy", _
>         DrawingObjects:=False, _
>         Contents:=True, _
>         Scenarios:=False, _
>         UserInterfaceOnly:=True

>     ActiveWorkbook.Worksheets("Prep Back Nine").Protect _
>         Password:="lINDy", _
>         DrawingObjects:=False, _
>         Contents:=True, _
>         Scenarios:=False, _
>         UserInterfaceOnly:=True

>     ActiveWorkbook.Worksheets("Final Front Nine").Protect _
>         Password:="lINDy", _
>         DrawingObjects:=False, _
>         Contents:=True, _
>         Scenarios:=False, _
>         UserInterfaceOnly:=True

>     ActiveWorkbook.Worksheets("Prep Front Nine").Visible =
> xlVeryHidden
>     ActiveWorkbook.Worksheets("Prep Back Nine").Visible =
> xlVeryHidden
>     ActiveWorkbook.Worksheets("Final Front Nine").Visible
> = xlVeryHidden
>     ActiveWorkbook.Worksheets("Final Back Nine").Visible =
> xlVeryHidden
>     ActiveWorkbook.Worksheets("Temp").Visible =
> xlVeryHidden
>     ActiveWorkbook.Worksheets("Rating").Visible =
> xlVeryHidden

> End Sub

> _______________

> ' This snippet of code works!

> Private Sub btnNextfrn_Click()

>     Set wsPrFr = ActiveWorkbook.Worksheets("Prep Front
> Nine")

>     Unload Me

>     wsPrFr.Range("M1").Value = txtCourse.Value
> End Sub
> __________________________

> This snippet of code gets the error message when it
> reaches the last line of the snippet!

> Private Sub btnNexCrs_Click()

>     Set wsFiFr = ActiveWorkbook.Worksheets("Final Front
> Nine")
>     Set wsTemp = ActiveWorkbook.Worksheets("Temp")

>     Unload Me

>     wsTemp.Range("AL1").Value = txtDate.Value
> ' fails on above line
> End Sub
> ________________

> >-----Original Message-----
> >Hi George:

> >If you post your code, it'll save people from trying to
> guess at exactly
> >where the problem might lie.
> >--
> >Regards,

> >Vasant.



> >> I have a workbook with 3 worksheets in Excel 2000 under
> >> Windows 98.

> >> As part of the Workbook Open, I protect each worksheet
> >> individually for contents = true and User Interface
> Only =
> >> true.  I also set each worksheet to Visible =
> xlVeryHidden.

> >> The user enters data through User Forms only.  The user
> >> forms enter data onto the first two worksheets
> perfectly.

> >> When the User Forms try to enter data onto the third
> >> worksheet, a Run-Time Error '1004': The cell or chart
> you
> >> are trying to change is protected .... dialog is
> presented.

> >> The Microsoft Knowledge Base indicated that sometimes
> too
> >> many Protects can cause problems, so I have checked the
> >> entire project for "Protect" and the only place that it
> >> occurs is in Workbook Open and the Workbook Close. I
> have
> >> opened the Immediate window and checked the Protection
> >> Mode of the Worksheet in question just before the code
> >> tries to write to it and it comes back as "True"
> >> indicating (I think) that the User Interface Only is set
> >> to True.

> >> Obviously, I can find no difference between the code for
> >> the worksheets that work and the ones that don't work.

> >> I am at a loss, any suggestions on where to look?

> >.



Fri, 21 May 2004 08:32:40 GMT  
 User Interface Protection Problem
AAghhhh!

This is a classic case where the person who wrote the code
cannot see the forest for the trees!

You are exactly RIGHT, I have struggled with this for 3
days (off and on), and may now be the reigning expert on
User Interface Only.  But, I missed the obvious.

Thank you

  George

Quote:
>-----Original Message-----
>Hi George:

>I don't see in your code where UserInterfaceOnly is set
to True for the
>worksheet "Temp".
>--
>Regards,

>Vasant.



>> _There is a LOT of code associated with the User Forms
so
>> I have included the relevant lines for the Workbook
Open,
>> User Form that works (btnNextfrn_Click), User Form that
>> fails (btnNexCrs_Click, and Workbook Close.

>>  _____________
>> Private Sub Workbook_Open()

>> ShowView "Open"

>> On Error Resume Next

>>     ActiveWorkbook.Worksheets("Prep Front
Nine").Protect _
>>         Password:="lINDy", _
>>         DrawingObjects:=False, _
>>         Contents:=True, _
>>         Scenarios:=False, _
>>         UserInterfaceOnly:=True

>>     ActiveWorkbook.Worksheets("Prep Back Nine").Protect
_
>>         Password:="lINDy", _
>>         DrawingObjects:=False, _
>>         Contents:=True, _
>>         Scenarios:=False, _
>>         UserInterfaceOnly:=True

>>     ActiveWorkbook.Worksheets("Final Front
Nine").Protect _
>>         Password:="lINDy", _
>>         DrawingObjects:=False, _
>>         Contents:=True, _
>>         Scenarios:=False, _
>>         UserInterfaceOnly:=True

>>     ActiveWorkbook.Worksheets("Prep Front
Nine").Visible =
>> xlVeryHidden
>>     ActiveWorkbook.Worksheets("Prep Back Nine").Visible
=
>> xlVeryHidden
>>     ActiveWorkbook.Worksheets("Final Front
Nine").Visible
>> = xlVeryHidden
>>     ActiveWorkbook.Worksheets("Final Back
Nine").Visible =
>> xlVeryHidden
>>     ActiveWorkbook.Worksheets("Temp").Visible =
>> xlVeryHidden
>>     ActiveWorkbook.Worksheets("Rating").Visible =
>> xlVeryHidden

>> End Sub

>> _______________

>> ' This snippet of code works!

>> Private Sub btnNextfrn_Click()

>>     Set wsPrFr = ActiveWorkbook.Worksheets("Prep Front
>> Nine")

>>     Unload Me

>>     wsPrFr.Range("M1").Value = txtCourse.Value
>> End Sub
>> __________________________

>> This snippet of code gets the error message when it
>> reaches the last line of the snippet!

>> Private Sub btnNexCrs_Click()

>>     Set wsFiFr = ActiveWorkbook.Worksheets("Final Front
>> Nine")
>>     Set wsTemp = ActiveWorkbook.Worksheets("Temp")

>>     Unload Me

>>     wsTemp.Range("AL1").Value = txtDate.Value
>> ' fails on above line
>> End Sub
>> ________________

>> >-----Original Message-----
>> >Hi George:

>> >If you post your code, it'll save people from trying to
>> guess at exactly
>> >where the problem might lie.
>> >--
>> >Regards,

>> >Vasant.



>> >> I have a workbook with 3 worksheets in Excel 2000
under
>> >> Windows 98.

>> >> As part of the Workbook Open, I protect each
worksheet
>> >> individually for contents = true and User Interface
>> Only =
>> >> true.  I also set each worksheet to Visible =
>> xlVeryHidden.

>> >> The user enters data through User Forms only.  The
user
>> >> forms enter data onto the first two worksheets
>> perfectly.

>> >> When the User Forms try to enter data onto the third
>> >> worksheet, a Run-Time Error '1004': The cell or chart
>> you
>> >> are trying to change is protected .... dialog is
>> presented.

>> >> The Microsoft Knowledge Base indicated that sometimes
>> too
>> >> many Protects can cause problems, so I have checked
the
>> >> entire project for "Protect" and the only place that
it
>> >> occurs is in Workbook Open and the Workbook Close. I
>> have
>> >> opened the Immediate window and checked the
Protection
>> >> Mode of the Worksheet in question just before the
code
>> >> tries to write to it and it comes back as "True"
>> >> indicating (I think) that the User Interface Only is
set
>> >> to True.

>> >> Obviously, I can find no difference between the code
for
>> >> the worksheets that work and the ones that don't
work.

>> >> I am at a loss, any suggestions on where to look?

>> >.

>.



Fri, 21 May 2004 09:13:30 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Application Interface - User Interface

2. Problem creating user interface

3. Multilanguage User Interface problem

4. How can I creat a user interface in Access, without letting the user

5. How can I creat a user interface in Access, without letting the user

6. How can I creat a user interface in Access, without letting the user

7. How can I creat a user interface in Access, without letting the user

8. How can I creat a user interface in Access, without letting the user

9. How can I creat a user interface in Access, without letting the user

10. How can I creat a user interface in Access, without letting the user


 
Powered by phpBB® Forum Software © phpBB Group