+ Reply to Thread
Results 1 to 6 of 6

Pearson Form Positioner with Locked Workbook

  1. #1
    Registered User
    Join Date
    06-07-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    56

    Pearson Form Positioner with Locked Workbook

    I'm using the pearson form positioner, but I am getting errors with my locked workbook.

    Please Login or Register  to view this content.
    It is erroring on the line with PS

    The error is

    Run-time error '1004':
    Unable to set the visible property of the Worksheet class

    I'm unlocking before and after PS. Do I even unlocked within the PositionForm Function, and it still gives that error? Is there somewhere else in this class I need to unlock?
    Last edited by andrew c.; 07-20-2011 at 12:18 PM.

  2. #2
    Registered User
    Join Date
    06-07-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: Pearson Form Positioner with Locked Workbook

    Shouldn't unlocking not even be an issue if I have explicitly unlocked it beforehand in the code. it isn't like just because I called a function, I need to unlock the workbook again right? Or are the class variables locked or something upon opening of the workbook and I need to unlock specifically within that class?

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Pearson Form Positioner with Locked Workbook

    Is the sheet protected as well?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: Pearson Form Positioner with Locked Workbook

    For me Chip's code works as expected for a protect worbook and or worksheet.

    What exactly is Activities in your code?
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    06-07-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: Pearson Form Positioner with Locked Workbook

    The sheet is unlocked at the moment, it is just that the workbook is protected.

    Activities is a userform.


    When I protected the workbook, I chose the option of protecting both structures and windows. Does this affect anything?

  6. #6
    Registered User
    Join Date
    06-07-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: Pearson Form Positioner with Locked Workbook

    So if I declare my protection like this:

    Please Login or Register  to view this content.

    it works??? IDK why I had to specify structure and windows....
    Last edited by andrew c.; 07-19-2011 at 05:25 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1