VB Help

Posted on 2012-08-20
Last Modified: 2012-08-20
Please can you help with the attached workbook.

On sheet 1 "Data Input" I have a list of dates which I will enter-

The date + time of appointment

I want to add a vb command button so that it will convert the dates and then highlight the relervant sections upon the two calenders "March - August 2012" & "September 2012 - February 2013".

In column F sheet 1 I hope to use the listed colour code, so it will be possible to use different colours to highlight.

Any dates outside those listed (+ colour code) I'd like to keep as is on the two calenders.

Many thanks for your help, this is not easy because the calenders have intervals of 15 mins. So if a appointment was for 14 mins for example, none of the indivdual segments would be highlighted. If it was for 15, then just one would be.
Question by:Kiwi-123
    LVL 8

    Expert Comment

    by:Elton Pascua
    Here's a partial (works with March to August dates) solution. Is this what you were looking for?

    Author Comment

    Hi Techfanatic,

    Many thanks for your help, the example is exactly what I was looking for. Is there a chance I can extend this onto "September 2012 - February 2013".

    If the date was removed/amended on sheet 1, would it be possible for the code to place the affected cells in their orginal state.

    Thanks again!
    LVL 8

    Accepted Solution

    Try this one. The macro automatically clears all the cells before inputting the date fills. This should now work with both sheets.

    I've placed comments in the code for better understanding.

    Author Closing Comment

    Fantastic, many thanks for your help!

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now