Link control to Excel cell to click a day in month to return date

J

Janas in RSA

I want to link a Control to an Excel cell. When I click the control (e.g.
maybe a square date box or down arrow as in Validate) I want to see at top a
changeable "YEAR" and "MONTH" and below it, by week, the weekdays for "YEAR"
and "MONTH". Once I have selected the "YEAR" and "MONTH" I need, I click a
day of the week and the control must then insert the date (for selected
"DAY", "MONTH" and "YEAR") in the cell that is linked to the control.
 
J

Janas in RSA

Thank you - I see the calendar - what I need is once I have the year and
month needed on the calendar, I want to click a day and the calendar must
disappear and the seleted day, month and year must be present in the cell -
similar to the "Validate" function where you can select an item and it
appears in the cell.
 
R

Ron de Bruin

Read the info on the page below the code


Tip 2: If you want that the calendar disappear when you click on a date in the control you have two options.

After ActiveCell.Select in the Calendar_Click event add this line.
Calendar1.Visible = False

Or select a cell next to the date cell, Replace ActiveCell.Select for:
ActiveCell.Offset(0, 1).Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top