+ Reply to Thread
Results 1 to 18 of 18

Adding a macro that will work even when the sheet or workbook is protected (locked)

  1. #1
    Registered User
    Join Date
    10-31-2013
    Location
    Exeter, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Cool Adding a macro that will work even when the sheet or workbook is protected (locked)

    Morning all,

    Another question for you.

    I'm creating a timesheet for contractors to use to record their location and working hours. They will be using a netbook, so figured it would be good if I can make the timesheet as small as posible.

    I thought it would be a good idea to add a macro that when pressed created another row.

    All was going well, and the macro worked perfectly, right up until i locked the sheet. Now the Macro doesn't work at all.

    Any ideas on how I can get around this little hickup?

    Many Thanks,


    Will

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,443

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Something like:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Hi Will

    Place this Code in ThisWorkbook Module...Code will run on Protected Sheets
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    10-31-2013
    Location
    Exeter, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Many thanks for all your help gents.

    Sorry for the late reply!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,443

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,443

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Thanks for the rep.

  7. #7
    Registered User
    Join Date
    10-31-2013
    Location
    Exeter, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    You earned it kiddo *said in a Michael Buble style* lol - Don't take that the wrong way!

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,443

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Don't take that the wrong way!

    What way would that be?

  9. #9
    Registered User
    Join Date
    10-31-2013
    Location
    Exeter, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Quote Originally Posted by TMShucks View Post
    What way would that be?
    Ohhhh Don't worry

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,443

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Not worried. Intrigued. I have no idea what a "Michael Buble style" is.

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    You're welcome...glad I could help. Thanks for the Rep.

  12. #12
    Registered User
    Join Date
    10-31-2013
    Location
    Exeter, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Talking Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Quote Originally Posted by TMShucks View Post
    Not worried. Intrigued. I have no idea what a "Michael Buble style" is.
    You know who Michael Buble is surely....It sounded funny in my head lol

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,443

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    You know who Michael Buble is surely
    He's a man. He's a singer. He's got a c r a p website. Can't really say I've seen or heard much of him. Probably wouldn't recognise him without subtitles or an introduction. I'm sure I've heard him sing but no idea, in all honesty, what he sounds like. My knowing nothing about him doesn't seem to have affected his fame.

    So, like I said, no idea what a "Michael Buble style" might look or sound like. But the fact that I "shouldn't take it the wrong way" implies that I might, and I wouldn't like it


    Regards, TMS

  14. #14
    Registered User
    Join Date
    10-31-2013
    Location
    Exeter, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Quote Originally Posted by TMShucks View Post
    He's a man. He's a singer. He's got a c r a p website. Can't really say I've seen or heard much of him. Probably wouldn't recognise him without subtitles or an introduction. I'm sure I've heard him sing but no idea, in all honesty, what he sounds like. My knowing nothing about him doesn't seem to have affected his fame.

    So, like I said, no idea what a "Michael Buble style" might look or sound like. But the fact that I "shouldn't take it the wrong way" implies that I might, and I wouldn't like it


    Regards, TMS
    Well, he's...how can i put it, supposed to be very sophisticated, cool headed and able to charm any woman. Me saying 'Kiddo' and maybe saying what I said in a way he might say it (in my head anyway), could sound condescending.

  15. #15
    Registered User
    Join Date
    10-31-2013
    Location
    Exeter, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Quote Originally Posted by jaslake View Post
    You're welcome...glad I could help. Thanks for the Rep.
    No problem jaslake!

  16. #16
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,443

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    You clearly know more about him than I would want or need to. Won't ask why. Think we should probably draw a line now

  17. #17
    Registered User
    Join Date
    10-31-2013
    Location
    Exeter, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Haha, I think that's a good shout TMShucks! Thanks again for the help.

    P.s. - Genuinely wasn't trying to offend! lol

  18. #18
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,443

    Re: Adding a macro that will work even when the sheet or workbook is protected (locked)

    Genuinely wasn't trying to offend!

    I know. I was just messing ...

    Have a good weekend. Regards, TMS

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. MAcro does not work when certain cells in a work sheet are protected
    By Unnati in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2012, 03:38 AM
  2. Replies: 2
    Last Post: 06-09-2012, 09:08 AM
  3. [SOLVED] How to make this code work even if the cells are locked and sheet is protected
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2012, 01:14 PM
  4. Locked Sheet - Macro's work - Internet Links Do Not
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2009, 02:33 PM
  5. Replies: 2
    Last Post: 07-11-2006, 11:15 PM

Tags for this Thread

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