+ Reply to Thread
Results 1 to 12 of 12

Auto Hide Date Columns--NEED HELP!!

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    Tucson AZ
    MS-Off Ver
    2010
    Posts
    8

    Auto Hide Date Columns--NEED HELP!!

    I have no idea what to do or how to do it and any help would be great. Ok so I have a doc that columns R1-FW1 are weekday dates and what I would like to do is only have the current week dates displayed and autohide the others. What it is is an attendance record for an afterschool program and I am trying to make it as easy as possible for the teachers to use. It has 4 sheets and I would like it to affect all 4 when the doc is opened. I hope this is clear enough. any help would be greatly appriciated. Thanks

  2. #2
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Auto Hide Date Columns--NEED HELP!!

    Try this code. Make sure to put it in the "ThisWorkbook" module.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-19-2012
    Location
    Tucson AZ
    MS-Off Ver
    2010
    Posts
    8

    Re: Auto Hide Date Columns--NEED HELP!!

    I put it in and it gave me this error:
    Run time error 1004
    Unable to get the weekday property of the worksheet function class.

  4. #4
    Registered User
    Join Date
    10-19-2012
    Location
    Tucson AZ
    MS-Off Ver
    2010
    Posts
    8

    Re: Auto Hide Date Columns--NEED HELP!!

    Nevermind, it had the wrong range, it starts at R1 so I change it and it works great. THANK YOU SO VERY MUCH!!

  5. #5
    Registered User
    Join Date
    10-19-2012
    Location
    Tucson AZ
    MS-Off Ver
    2010
    Posts
    8

    Re: Auto Hide Date Columns--NEED HELP!!

    Actually there is 1 minor issue it not showing todays date, its showing tomorrows first.

  6. #6
    Registered User
    Join Date
    10-19-2012
    Location
    Tucson AZ
    MS-Off Ver
    2010
    Posts
    8

    Re: Auto Hide Date Columns--NEED HELP!!

    Again nevermind, it only did that one time. So again I say thank you. Just 1 final question, will it chenge on its own every week or do I need to do something to it?

  7. #7
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Auto Hide Date Columns--NEED HELP!!

    It should change on its own. However, right now it hides previous days (i.e. it doesn't show an entire week, it only shows the remaining days). For example, on Monday it will show Monday through Friday. On Tuesday it will show Tuesday through Friday but no longer Monday. I don't think this is how you want it to work.

  8. #8
    Registered User
    Join Date
    10-19-2012
    Location
    Tucson AZ
    MS-Off Ver
    2010
    Posts
    8

    Re: Auto Hide Date Columns--NEED HELP!!

    That perfectly fine, I can not thank you enough. I am going to get some books and learn more about this and hopefully someday I will be as good as you.

  9. #9
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Auto Hide Date Columns--NEED HELP!!

    Here is modified code. I added Application.ScreenUpdating = False to keep the screen from flickering when the book opens. I also added the code to unhide the hidden cells when the next week occurs. Happy to help. Keep at it. This forum is a great place to learn. The best advice I can give you is to look at the code people give you and to understand what it is doing rather than just plugging it into a workbook. I will continue to work to modify the code to show the whole week all week long.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    10-19-2012
    Location
    Tucson AZ
    MS-Off Ver
    2010
    Posts
    8

    Re: Auto Hide Date Columns--NEED HELP!!

    You don't have to do that, it is absolutley fine to have it start on the currnet day, it makes it much easier for the teachers.

  11. #11
    Registered User
    Join Date
    10-19-2012
    Location
    Tucson AZ
    MS-Off Ver
    2010
    Posts
    8

    Re: Auto Hide Date Columns--NEED HELP!!

    Ok 1 last thing, since adding to unhide all it will also unhide some that aren't in the range, so can you add to hide columns G-M.

  12. #12
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Auto Hide Date Columns--NEED HELP!!

    No worries. I'll fix it when I get a chance and private message you.

    I kind of want to fix it. I don't like to leave anything hanging and it's irritating me. Plus, it's kind of like a puzzle to me. I don't want to stop in the middle.

    I am glad it is working for you well enough though. Please mark this thread as solved by scrolling to the top and clicking Thread Tool -> Mark Thread as Solved.

+ 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