+ Reply to Thread
Results 1 to 4 of 4

Macro Button disabled in protected worksheet

  1. #1
    Registered User
    Join Date
    05-26-2016
    Location
    Berks Endland
    MS-Off Ver
    2010
    Posts
    5

    Macro Button disabled in protected worksheet

    Hi Guys

    I have managed to get a macro working that sends an email with attachment from my spreadsheet, with a little help from you very kind people.

    It all works great until I protect the worksheet and it prevents the macro from working.
    I've tried using Activesheet.unprotect ad Activesheet.protect at either and, but still no joy. Can anyone advise?

    Apologies if it is obvious, but I'm pretty new to VBA.

    Thanks in advance, VBA is below -

    Please Login or Register  to view this content.
    Last edited by Sam Hatch; 05-26-2016 at 12:12 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Macro Button disabled in protected worksheet

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    05-26-2016
    Location
    Berks Endland
    MS-Off Ver
    2010
    Posts
    5

    Re: Macro Button disabled in protected worksheet

    Quote Originally Posted by zbor View Post
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Sorted, apologies for not realising this before.

    Sam

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Macro Button disabled in protected worksheet

    Since you jumping from one workbook to another there could be problem with Activesheet.

    Try:

    Please Login or Register  to view this content.
    Maybe I'm on a wrong track but this is first thing that crosses mine mind.

+ 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. [SOLVED] Disable or hide a recorded macro button when clicked if the worksheet is protected
    By sai19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-31-2014, 12:14 PM
  2. [SOLVED] Macro to keep count of click of button on protected worksheet
    By CharlieZangel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2012, 03:37 PM
  3. Disabled VBE and Macro button on workbook open
    By contaminated in forum Excel General
    Replies: 1
    Last Post: 01-16-2010, 02:44 AM
  4. macro assigned to a form control button in a protected worksheet
    By lee_har in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2009, 02:29 AM
  5. Disabled Absolute/Relative Macro Button
    By J Shrimps, Jr. in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-05-2006, 03:15 PM
  6. Why Is The Macro Edit Button Disabled?
    By KelleyS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2006, 07:50 PM

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