+ Reply to Thread
Results 1 to 2 of 2

Clear Function Resets Cell Lock Property

  1. #1
    Registered User
    Join Date
    02-09-2011
    Location
    Iowa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Clear Function Resets Cell Lock Property

    I have a macro that clears the contents of a range of cells every day, but after the macro runs, it resets the cell lock feature to default.

    I would ideally like to set the font, font size, and cell lock features of all the cells to be cleared daily, without having these settings messed with. Anyone know the best way to accomplish this?

    The code is simple...

    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Clear Function Resets Cell Lock Property

    Welcome to the forum!

    The following change will just clear the value or formula without affecting any other settings:

    Please Login or Register  to view this content.
    However, looking overall at what you are doing I would recommend this code. There is no need to loop if you are going to clear every nonempty cell. This is much faster. There is also no need to mess with calculation:

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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