+ Reply to Thread
Results 1 to 6 of 6

VBA to copy all unprotected cells to another workbook

  1. #1
    Forum Contributor
    Join Date
    11-08-2017
    Location
    Murfreesboro, TN
    MS-Off Ver
    MS 365
    Posts
    168

    VBA to copy all unprotected cells to another workbook

    I am trying to make a back-up of all user input into a spreadsheet with multiple sheets. I have 22 sheets with each tab specifically named. 8 of the 22 sheets have user input that needs to be copied into another workbook as values.

    I found this code on another site, but I don't want the loop to go through all of the sheets, just the specifically named sheets that have user input.

    How do I change this code to cycle through just the sheets I need copied?

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,277

    Re: VBA to copy all unprotected cells to another workbook

    Change in this line
    Please Login or Register  to view this content.
    Last edited by daboho; 11-18-2018 at 05:45 PM.

  3. #3
    Forum Contributor
    Join Date
    11-08-2017
    Location
    Murfreesboro, TN
    MS-Off Ver
    MS 365
    Posts
    168

    Re: VBA to copy all unprotected cells to another workbook

    Thank you for the super-fast reply.

    I changed the code and entered my worksheet names as indicated, but I get a run-time error (Subscript out of range) on the next line:

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,277
    Quote Originally Posted by LKERN View Post
    Thank you for the super-fast reply.

    I changed the code and entered my worksheet names as indicated, but I get a run-time error (Subscript out of range) on the next line:

    Please Login or Register  to view this content.
    Try change to
    Please Login or Register  to view this content.
    "ThankyouFor Attention * And Your Help!!"

  5. #5
    Forum Contributor
    Join Date
    11-08-2017
    Location
    Murfreesboro, TN
    MS-Off Ver
    MS 365
    Posts
    168

    Re: VBA to copy all unprotected cells to another workbook

    I removed the .name and now I get "Type mismatch" run-time error on the same line.

  6. #6
    Forum Contributor
    Join Date
    11-08-2017
    Location
    Murfreesboro, TN
    MS-Off Ver
    MS 365
    Posts
    168

    Re: VBA to copy all unprotected cells to another workbook

    I went back and deleted all but 2 of the sheet names that I entered and it did not error on the same line. This time the error is "Runtime Error 13: Type Mismatch" on this line:

    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)

Similar Threads

  1. [SOLVED] Make workbook copy unprotected
    By drgkt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-13-2017, 10:37 AM
  2. Replies: 5
    Last Post: 07-10-2015, 04:20 PM
  3. Copy and paste only unprotected cells...
    By johnny.rockets in forum Excel General
    Replies: 4
    Last Post: 01-20-2013, 04:52 AM
  4. Copy and paste only unprotected cells...
    By johnny.rockets in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 06:02 PM
  5. Copy and paste only unprotected cells...
    By johnny.rockets in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-18-2013, 01:58 PM
  6. Time lock an entire workbook - even unprotected cells
    By AlexanderTheAverage in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2012, 01:57 PM
  7. [SOLVED] Clear contents of unprotected cells in entire workbook with a macr
    By FinnGirl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2005, 01:05 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