+ Reply to Thread
Results 1 to 2 of 2

Open workbook, automatically hide columns based on past dates

  1. #1
    Registered User
    Join Date
    10-15-2019
    Location
    Canberra, Australia
    MS-Off Ver
    Windows 10, MS Office 2016
    Posts
    3

    Open workbook, automatically hide columns based on past dates

    Hello,

    I am new this Forum. I have tried multiple options from sources on the internet to get VBA to work for my problem, without success. So I thought I'd join this forum and see if anyone can assist.

    The problem:
    I would like the worksheet "Calendar" to automatically hide all columns with weeks that have passed.

    The Trick:
    One thing to note is that, the dates are written as week beginning, e.g. cell S3 is 14-Oct-19, representing week beginning Monday 14 October 2019 (today is 15-Oct-19) so I don't want this cell to be hidden, but all previous weeks should be hidden, e.g. Cells D3:R3 which go from 1-Jul-19 to 7-Oct-19. That is the column with the current week needs to remain visible even if the week beginning date has passed.

    Full column date range is:
    D3:DD3

    Many thanks in advance for your someone's help?

    Attachment:
    How do I attach the uploaded file - Calendar worksheet?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    XLS 2016
    Posts
    4,128

    Re: Open workbook, automatically hide columns based on past dates

    See next macro in a module
    Please Login or Register  to view this content.
    and put next other code in CALENDAR sheet's code

    Please Login or Register  to view this content.
    See file attached
    Attached Files Attached Files
    - Battle without fear gives no glory - Just try

+ 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