+ Reply to Thread
Results 1 to 5 of 5

Locking Columns after todays date has passed

  1. #1
    Registered User
    Join Date
    07-27-2017
    Location
    UK
    MS-Off Ver
    2012
    Posts
    43

    Locking Columns after todays date has passed

    Hi, I have read a few posts on this but cant get this to work for me. I have a table with dates in the row headers (dates for every friday) and data is manually entered on a weekly basis in each column. I'd like a way to automatically lock the data (with a password) for each previous week up to the current date. See attached file.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Locking Columns after todays date has passed

    With Sheet Protection, in exemple 'test'
    Password to show all = also 'test'

    code for buttons
    Please Login or Register  to view this content.
    In workbooks open
    Please Login or Register  to view this content.
    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-27-2017
    Location
    UK
    MS-Off Ver
    2012
    Posts
    43

    Re: Locking Columns after todays date has passed

    Thanks for this though I cant open the file as it say the file format or extension is not valid? I'm using excel 2010.

    Thankyou.

  4. #4
    Registered User
    Join Date
    07-27-2017
    Location
    UK
    MS-Off Ver
    2012
    Posts
    43

    Re: Locking Columns after todays date has passed

    Ok I managed to run the code though when commandbutton2 is pressed, it hides all cells after 29 June and locks ALL cells down. Then commandbutton1 unlocks and unhides all. What I want is to lock (not hide) all columns prior to todays date but always be able to edit the current weeks value. Hope that makes sense.

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,358

    Re: Locking Columns after todays date has passed

    In ThisWorkbook module.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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] When date is passed certain row columns should change color
    By sealpino in forum Excel General
    Replies: 4
    Last Post: 03-18-2017, 01:47 PM
  2. [SOLVED] Change color of a field when passed todays date
    By sealpino in forum Excel General
    Replies: 3
    Last Post: 02-18-2017, 03:34 PM
  3. Autohide Columns that are < todays date and > todays date by 2 & 7 days
    By Dropfiddy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2015, 03:51 AM
  4. Macro: Add Todays Date if 4 columns maintain value (Any value)
    By jaredmccullough in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2015, 04:40 PM
  5. VBA for locking cells if not todays date
    By Abukhadeejah in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2015, 03:49 AM
  6. Locking cells when today's date is passed.
    By Amir AbdRabu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-29-2014, 09:09 AM
  7. [SOLVED] Help with code to delete a row if todays date has passed
    By nje in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-05-2013, 04:11 AM

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