+ Reply to Thread
Results 1 to 3 of 3

Protecting Cells with Macros

  1. #1
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    224

    Protecting Cells with Macros

    Hey,

    I'm working on this project for our company's Quality Control

    I have a few macros in this excel spreadsheet that work GREAT. Now that I have everything working, I want to protect the formulas in some sheets so that when the manufacturers plug in the data they don't accidentally delete anything they're not supposed to

    When protecting the cells in the sheets, I get an error message, which I can't figure out what wrong, or if there's an alternative way to protect these cells. I've just been locking the cells then protecting the sheet

    In Sheet1, to test to see that the program is functioning properly, push the "Random Number Generator" button, then the "Record Data" button and the data will be recorded in the corresponding Model # in the worksheets

    Specifically, I've been trying to protect these cells:
    Worksheet: "1098"; Cells: A1:DR24
    Worksheet: "1190"; Cells: A1:DR24
    Worksheet: "1220"; Cells: A1:DR24


    If someone could help me out, I'd really appreciate it

    Thank you for your time
    Bob
    Attached Files Attached Files
    Last edited by sighlent1; 03-04-2010 at 05:00 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Protecting Cells with Macros

    Hi Bob,

    If you want macros to work on protected sheets, you usually have to unprotect the sheet at the beginning of your code, then re-protect it when the macro finishes. For example:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-11-2009
    Location
    Montclair, NJ
    MS-Off Ver
    Excel 365
    Posts
    224

    Re: Protecting Cells with Macros

    EXCELLENT!!!!.......Thank you sooooo much Paul...this is EXACTLY what I was looking for

    Thanks
    Bob

+ 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