+ Reply to Thread
Results 1 to 3 of 3

Clear all unprotected Cells

  1. #1
    Registered User
    Join Date
    06-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    64

    Clear all unprotected Cells

    So, I looked around a found a bit of code and the good news is that it does cycle through all my sheets but I can't seem to actually make it clear all my unprotected cells.

    I get an "application defined or object defined error". Maybe the issue is that I'm trying to clear contents on protected cells and that I need to find a way to not select the protected ones? I Read about a way to select all cells and then only select the ones that meet criteria -- something like ".selection.specialCells(xlCellTypeConstants, 23).Select " -- not sure if there's a way to make the criteria be unprotected cells?

    Thanks in advance!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Clear all unprotected Cells

    Try this. It uses a nifty undocumented trick by mikerickson to clear the unlocked cells.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    06-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    64

    Re: Clear all unprotected Cells

    worked perfectly by just copy/paste. Couldn't have been smoother, thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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