+ Reply to Thread
Results 1 to 3 of 3

How can I lock worksheets while still allowing macros to operate?

  1. #1
    enginguven
    Guest

    How can I lock worksheets while still allowing macros to operate?

    When I lock the worksheets that macros should enter into while operating, I
    get an error message. Then macros couldn't of course work properly. How can I
    lock the worksheets and macros can still operate?

  2. #2
    NUMBnut
    Guest

    RE: How can I lock worksheets while still allowing macros to operate?

    Right click unto your macros and choose to format it. You should have a
    protection tab, and de-select the lock box. If not go to the properties
    under the right click. You should get another window, and it will have a
    "lock" row, choose to make the lock feature "false".

    "enginguven" wrote:

    > When I lock the worksheets that macros should enter into while operating, I
    > get an error message. Then macros couldn't of course work properly. How can I
    > lock the worksheets and macros can still operate?


  3. #3
    Norman Jones
    Guest

    Re: How can I lock worksheets while still allowing macros to operate?

    Hi Enginguven,

    Setting the Protect method's UserInterfaceOnly parameter to true enables vba
    manipulation of the protected sheet.

    However, this setting is not persistent and needs to be reset each time the
    workbook is opened.

    Perhaps, therefore, you could set protection in the Workbook_Open or
    Auto_Open procedures, e.g.:

    '=========>>
    Sub Auto_Open()
    With Worksheets("sheet1")
    .Protect Password:="drowssap", UserInterfaceOnly:=True
    End With
    End Sub
    '<<=========


    ---
    Regards,
    Norman


    "enginguven" <enginguven@discussions.microsoft.com> wrote in message
    news:8AB74F04-68CF-49AB-8FE6-EF6E8AADDF68@microsoft.com...
    > When I lock the worksheets that macros should enter into while operating,
    > I
    > get an error message. Then macros couldn't of course work properly. How
    > can I
    > lock the worksheets and macros can still operate?




+ 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