I have a calendar in my spreadsheet that returns a date selected to a cell that is active.
When the user clicks cell D40 in worksheet Surcharges, I use a Worksheet_SelectionChange event to show the calendar. When the user selects a date it returns the date in that cell.
Problem is I want to limit the user to select a date no more than 90 days from today's date.
I was having a problem using today() in the vba code.
When i enter todays date in cell E39 (-today()) and use the code below it works:
Code
But when I try to use the today() function below I get errors:
Code
What am I doing wrong? I would prefer to avoid putting =today() in a cell and refer to it. Is that even possible?