Apr 4, 2013
I currently have a worksheet that when a user clicks on the cell, a calendar form opens. From here they can select a date, click ok, and the date gets placed in the corresponding cell they clicked on.
View 1 Replies
Now if the user needs to change that date, i want them to be able to click on the cell again, and when the calendar opens, the date in the cell would be selected on the calendar. I was able to do this in a userform, but im not sure how to edit it to work on the worksheet. I am using the below to populate the calendar.
private sub worksheet_selectionchange(byval target as range)
if not intersect(target,range("aa16:aa24")) is nothing then .show calendar
When the user clicks the date, the below code places it in the cell.
private sub ok_click()
with active cell
Now the below code was used when I was using a userform, but im not sure how to edit this to pull the date from the active cell.
if not tb is nothing then
if isdate(tb.value)then me.calendar1.value = tb.value