+ Reply to Thread
Results 1 to 17 of 17

VBA Highlight Today on Calendar

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    VBA Highlight Today on Calendar

    Hi,

    Is there a way to highlight today on the Calendar? There is existing code to put borders around the days on the calendar so maybe that code could be altered?

    Thanks for help
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,403

    Re: VBA Highlight Today on Calendar

    Select all cells in calendar (D4:J39) and in Condtional Formatting

    formu;a;:

    =D4=TODAY()
    Set fill to desired colour
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    Re: VBA Highlight Today on Calendar

    Thank you. Is it possible to only highlight the area inside the border area of the day number? I wish there were extra columns for the days so it would have more flexibility but it does not.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,667

    Re: VBA Highlight Today on Calendar

    Not with CF - the borders around the numbers are text boxes, not cell borders. Might be possible with VBA.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    Re: VBA Highlight Today on Calendar

    Yes I agree it probably would need VBA to do it.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,403

    Re: VBA Highlight Today on Calendar

    See attached where day is highlighted in RED with BOLD font: will this suffice?

    To use VBA, you will need a macro to execute when the workbook is opened as this is only "trigeer" of a macro I can think of.
    Attached Files Attached Files
    Last edited by JohnTopley; 09-29-2023 at 11:16 AM.

  7. #7
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    Re: VBA Highlight Today on Calendar

    So it's not possible to have a color filled inside the number box?

  8. #8
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    Re: VBA Highlight Today on Calendar

    How about with your original answer highlight rule and shade the part outside of the number box the same color as the background?

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,403

    Re: VBA Highlight Today on Calendar

    You cannot shade part of a cell so the only realistic option is as per my last solution. Any shading of the shape will simply hide the underlying text i.e the date.

    All this is very cosmetic and is it really worth the effort?

  10. #10
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    Re: VBA Highlight Today on Calendar

    Probably too much involved. Another possible option to have more flexibility would be to have 2 columns for each calendar day. I tried this before by inserting columns but it messed up the appointment codes.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,403

    Re: VBA Highlight Today on Calendar

    To do what you want, you really need a TEXTBOX shape which will allow both colouring of the background and the entry of text

    A lot of "pain" for no real "gain" (IMHO).

  12. #12
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    Re: VBA Highlight Today on Calendar

    If I insert columns to have the flexibility thus not needing the code for textboxes and also not needing the formulas for holidays and occasions list on the right could you help adjust the appointment codes?

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,403

    Re: VBA Highlight Today on Calendar

    I would need to see exactly what is involved before committing any time: you know my view from post #11 on continuing this type of work!

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,403

    Re: VBA Highlight Today on Calendar

    You cannot just randomly insert extra columns as this throws out all formula and VBA!

    I do respectfully suggest you put your time to ensuring that the BUSINESS aspects are working correctly (if this has not already been done!) rather spending time on these cosmetic changes.

  15. #15
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    Re: VBA Highlight Today on Calendar

    I inserted columns so that each day has a border.

    The first issue I see when clicking on appointment the information goes in column M but needs to go in column T
    Last edited by billy60; 09-29-2023 at 12:21 PM.

  16. #16
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    Re: VBA Highlight Today on Calendar

    Okay I just need one bit. I was able to get everything to function except for displaying a new appointment in the calendar. It saves the new appointment "bob" but it isn't being put in calendar day 9/1 as a shape like the other appointments.

  17. #17
    Forum Contributor
    Join Date
    02-26-2023
    Location
    Lousianna
    MS-Off Ver
    Microsoft 365
    Posts
    957

    Re: VBA Highlight Today on Calendar

    Okay thanks.

+ 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] Highlight cell in an excel calendar matrix when date is today
    By jameshelp in forum Excel General
    Replies: 4
    Last Post: 02-24-2021, 12:01 PM
  2. [SOLVED] I need to show who is on call today on a calendar
    By felipecastillo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-05-2020, 01:26 AM
  3. [SOLVED] Calendar: Go to and Highlight today
    By skyping in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-25-2014, 07:20 AM
  4. Highlight row if today birthday
    By dingdang in forum Excel General
    Replies: 4
    Last Post: 10-21-2013, 01:57 AM
  5. How to automatically highlight "today" in calendar
    By Excelnoob1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-28-2012, 08:51 PM
  6. [SOLVED] Show today's date on calendar
    By Marco-Kun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2012, 04:23 PM
  7. [SOLVED] Highlight the day of today
    By Jaydubs in forum Excel General
    Replies: 3
    Last Post: 10-14-2005, 10:05 PM

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