DatePicker calendar to cells

xchorse

New Member
Joined
Feb 2, 2016
Messages
12
I have been trying to add a calendar to a cell to help with data entry. I have followed along with this youtube video on how to add a Date Picker and the steps worked except the outcome doesn't work for me. https://www.youtube.com/watch?v=kYNaiXmbcoA

I am able to get the button to appear on the right of my cell and the calendar to appear but when I select the date the cell doesn't populate with the date that I selected like it shows in the video.

The only thing I can see that is different is the DatePicker Extension I followed the instructions to download the DatePicker Extension that this person provides in the notes for this video. And it shows that when he loaded the DatePicker Extension it shows up as (microsoft date and time picker control 6.0 (sp6)) and mine that I downloaded doesn't have the (sp6) at the end it just shows up as (microsoft date and time picker control 6.0). I am not sure if this (sp6) part is important or not. I tried to do some research on it but have gotten no where. It looks like there is a (SP6) and (SP4) I am not quite sure what the difference is but mine doesn't have the extension at all.

I am looking for help in trying to get a calendar to show up on the side of a cell so you can select the date and it will populate the cell. If there is a better way to accomplish this I am game for other options. It doesn't look like the DatePicker is the easiest way to do this but its not working correctly for me.

Any help would be awesome!
Cheers,
Marcy
 

xchorse

New Member
Joined
Feb 2, 2016
Messages
12
I am using 2010 but I also have access to 2013 on other computers in the office.
 

xchorse

New Member
Joined
Feb 2, 2016
Messages
12
Thanks for the link, it worked. I was able to add the calendar to the right click function when I select a cell. This is helpful but I am also looking to add it to a cell that way when someone else is in it they know that its there to use and is the best way to fill out the cell. I don't want people to have to remember to right click and then they will find the calendar as a quick reference there. Do you know how to link the calendar to cells in a column?
 

mumps

Well-known Member
Joined
Apr 11, 2012
Messages
8,529
Try the sample file at this link: https://app.box.com/s/4vsdmgd9ws9lxmf10eqc77uqziz4xkr5
If you click on any cell in column A, a calendar will pop up for you to pick a date that will be placed in the selected cell. You can change the cell location by modifying the range in the Worksheet_Change macro from Range("A:A") to whatever cell you want. To access the macro, right click the tab for the sheet and click 'View Code'.
 
Last edited:

xchorse

New Member
Joined
Feb 2, 2016
Messages
12
Thanks that worked, and is exactly what I am looking for.

However when I tried to copy the code and put it into my file it came back with a debug, and highlited CalendarFrm.Show. I am not sure how to fix this in the debug, I would like to know how to fix it.
Her is the code I copied from the file you sent.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("E:H")) Is Nothing Then Exit Sub
CalendarFrm.Show
Application.ScreenUpdating = True
End Sub

My work around was to use the file you provided and just copy and paste my stuff from the my file into the new one with the calendar code work. And then I seaved it with a new name for my use. However I would like to know how I can use the code by copying and pasting it into another file for the future.

Could it be because the file you sent is an .xlsm extension and the file I am using is a .xlsx file extension?
 

mumps

Well-known Member
Joined
Apr 11, 2012
Messages
8,529
You also have to copy the CalendarFrm to your file. You can do this by opening the file I posted and your file as well. Then hold down the ALT key and press the F11 key. This will open the Visual Basic Editor. In the left hand pane, you should see 'CalendarFrm' under 'Forms' for my file. Just click 'CalendarFrm' and drag it and drop it onto your VBA Project file name. Also make sure that you placed the Worksheet_SelectionChange macro into the worksheet code module by right clicking the tab for the sheet and clicking 'View Code'.
 

Forum statistics

Threads
1,082,316
Messages
5,364,483
Members
400,802
Latest member
RichBRich

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top