I have set up a calendar spreadsheet from a template found in Excel, but instead of having multiple sheets for the months of the year I have made an interactive calendar on just one sheet. I have written code for the Worksheet_SelectionChange in the range of cells that the calendar dates appear in so when a day is selected it will populate cells with values and format the selected day with border styles and colours, and it works just great and has become a very useful tool for my day-to-day schedule.
However, one issue I am having is if I accidently select a range of cells over these calendar days, instead of just selecting one day, then the code fails and I receive an error. Is there a way of running the code Worksheet_SelectionChange for when just a single cell is selected in the target range, and to exit the sub if more than one cell in the range is selected?
Thanks
Bookmarks