+ Reply to Thread
Results 1 to 3 of 3

Macros stop to work when work sheet is protected. Run time error 1004

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    8

    Macros stop to work when work sheet is protected. Run time error 1004

    I have three macros in my workbook that work fine. However, when I protect any of the worksheets, they stop to work and I get a run-time error 1004.

    I have tried following the two suggestions that I found online:

    Unprotect at start of macro code, and protect at end;
    User Interface Only) but the run-time error remains.
    I need my Workbook to be protected and for my macros to function, what shall I do?

    Here is the code for all three macros:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Last edited by Cutter; 10-17-2012 at 06:18 PM. Reason: Added code tags

  2. #2
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Macros stop to work when work sheet is protected. Run time error 1004

    Please use CODE tags for codes.
    And if there is more then 1 macro then seperate them.
    Else use
    Please Login or Register  to view this content.
    And
    Please Login or Register  to view this content.
    Before making changes to a sheet that is protected

  3. #3
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Macros stop to work when work sheet is protected. Run time error 1004

    I see in your codes you need to unprotect the inputWks and historyWks for the code not to run in against a locked worksheet.
    Like so this should work:
    Please Login or Register  to view this content.
    And then after it all
    Please Login or Register  to view this content.

+ 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