unprotecting sheet error
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: unprotecting sheet error

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I have a small problem with an Excel macro. I am trying to unprotect a sheet using the following code....

    sheet1.select
    sheet1.unprotect

    should be simple, but this causes an error. If I select a cell on the sheet explicitly then it works okay ie if I use

    sheet1.cells(1,1).select
    sheet1.unprotect

    does anybody know why?????

  2. #2
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am using excel2000 and your code worked for me.

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi
    If you are running your code from a command button, set it's TakeFocus******* Property to false.
    Tom

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com