+ Reply to Thread
Results 1 to 4 of 4

Run time error 1004 only immediately after opening protected workbook

  1. #1
    Registered User
    Join Date
    03-30-2013
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    41

    Run time error 1004 only immediately after opening protected workbook

    Hello all,

    After opening a protected workbook, all of my macros work except for one that changes the color scale on a map on the interface. I receive a Run time 1004 error. However, if I unprotect the workbook, it works just fine. I can even reprotect the workbook, and it will work; I only receive the error immediately after opening the workbook while it's still protected.

    The code is lengthy but is listed below. ***'s mark the line where the error is given.

    Please Login or Register  to view this content.
    Any direction would be greatly appreciated. Thanks!
    Joe

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Run time error 1004 only immediately after opening protected workbook

    Unprotect the workbook in your code to prevent the error.

    For example:

    Please Login or Register  to view this content.
    Let me know if this works

  3. #3
    Registered User
    Join Date
    03-30-2013
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Run time error 1004 only immediately after opening protected workbook

    BigBas,

    This did work! Thanks so much!

    Joe

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Run time error 1004 only immediately after opening protected workbook

    Happy to help

+ 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