+ Reply to Thread
Results 1 to 5 of 5

Unprotecting sheet after running a macro

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    Australia
    MS-Off Ver
    Excel 2011
    Posts
    18

    Unprotecting sheet after running a macro

    Hi Guys,

    I have this macro msgbox running in my protected sheet, by the time I select "Cancel" on the message box, my sheet become unprotected.

    I'd been done a few test, and my sheet just be unprotected just when I select "Cancel" on the macro message box.

    Could you help me to fix this problem?

    This is my macro:

    Please Login or Register  to view this content.
    [/CODE]
    Last edited by Leith Ross; 09-24-2012 at 02:33 AM. Reason: Added Code Tags

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Unprotecting sheet after running a macro

    Hi, Michell Feitosa,

    please use Code-Tags for displaying your code.

    Move the line to unprotect after the checking of the input like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    09-20-2012
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Unprotecting sheet after running a macro

    Try this:

    Please Login or Register  to view this content.
    Next time use CODE tags, or we will smash ya up! (Not really, probably just tell you to use code tags again!)

  4. #4
    Registered User
    Join Date
    09-20-2012
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Unprotecting sheet after running a macro

    Holger's is better, use his!

  5. #5
    Registered User
    Join Date
    09-20-2012
    Location
    Australia
    MS-Off Ver
    Excel 2011
    Posts
    18

    Re: Unprotecting sheet after running a macro

    You are amazing! thank you so much

+ 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