+ Reply to Thread
Results 1 to 3 of 3

Using a macro to write into a protected sheet.

  1. #1
    Registered User
    Join Date
    02-26-2013
    Location
    Ogden
    MS-Off Ver
    Excel 2007
    Posts
    53

    Using a macro to write into a protected sheet.

    Hi there everyone. I have a macro that copies information from one sheet and then copies it into another. I am not wanting to protect the 2nd said sheet, but if I hit the macro button it give me the runtime error "1004" "the sheet you are trying to change is protected...". Is there coding I can put into the macro that can circumvent the password?

  2. #2
    Registered User
    Join Date
    08-25-2011
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Using a macro to write into a protected sheet.

    Please Login or Register  to view this content.
    That should do the trick.

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Using a macro to write into a protected sheet.

    If your source sheet is protected, you have to unprotect it first, copy your data and then protect it again. Change the sheet name and password to match yours. Something like this:
    Sub Test()
    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