+ Reply to Thread
Results 1 to 2 of 2

How to execute a macro in a protected worksheet?

  1. #1
    Ha Noi
    Guest

    How to execute a macro in a protected worksheet?

    I create a new macro in my spreadsheet, and now I can't protect it because
    the macro won't work. please let me know.
    thks
    Hanoi

  2. #2
    Paul B
    Guest

    Re: How to execute a macro in a protected worksheet?

    Hanoi, one way,

    Const PW As String = "123" 'Change Password Here
    ActiveSheet.Unprotect Password:=PW
    'you code here
    ActiveSheet.Protect Password:=PW


    --
    Paul B
    Always backup your data before trying something new
    Please post any response to the newsgroups so others can benefit from it
    Feedback on answers is always appreciated!
    Using Excel 2002 & 2003

    "Ha Noi" <Ha [email protected]> wrote in message
    news:[email protected]...
    > I create a new macro in my spreadsheet, and now I can't protect it because
    > the macro won't work. please let me know.
    > thks
    > Hanoi




+ 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