How to Insert Excel Date Picker | Mini Calendar Add-in | Secret VBA Hack!

preview_player
Показать описание

I added this date picker to my Excel spreadsheet in less than 5 minutes!
One of the biggest complaints people have about Excel is that it’s hard to use. That’s why I always strive to make my spreadsheets as user-friendly as possible.
A date picker can be a game-changer for your spreadsheets because it simplifies the process of selecting dates, making data entry a delightful task.
In this tutorial, you'll learn how to set up this date picker from beginning to end. I’ll also teach you a VBA hack that can make the date picker pop-up only for date cells!


VBA CODE
----------------------------------------
'Put this procedure in your Worksheet's in the Microsoft Excel Objects folder
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

' Check if Active Cell format matches the "Short Date" number format
If ActiveCell.NumberFormat = "m/d/yyyy" Then
' If the Active Cell format is a date, make the calendar visible
ActiveSheet.Shapes("Calendar").Visible = True

' Change the position of the calendar to be just below and to the right of the Active Cell
ActiveSheet.Shapes("Calendar").Left = ActiveCell.Left + ActiveCell.Width
ActiveSheet.Shapes("Calendar").Top = ActiveCell.Top + ActiveCell.Height

' If the Active Cell isn't a date, make the calendar invisible
Else: ActiveSheet.Shapes("Calendar").Visible = False

End If

End Sub
----------------------------------------



00:00 Introduction
00:49 Native Date Picker
01:53 Get Mini Calendar Add-In
02:29 How it Works
04:02 VBA Hack Pop-Up Calendar
07:01 Custom Date Format
Рекомендации по теме
Комментарии
Автор

Thank you very much. You are a real teacher, thanks for all the

ioannisioannou
Автор

Insanely helpful! This is like the only useful vid on Date Picker thing I could find on Youtube

DanTran-ifjt
Автор

SUPER helpful. The only thing I would edit is the location of the date pick when it appears. When it is so close to the cell, it hides the drag function of that cell. A quick fix is to put a "1.5 x cell width" in the code to offset the date picker just a bit.

simplyidiotic
Автор

Totally on board - until the very end when you tell us that it wont work unless the macro is installed on every PC that will be using this. Why did you wait to state this? Kind of important right up front - no?

broderp
Автор

Thank you very much for your great video. Would you mind sharing with us how to highlight the date which already been filled in the popup calendar? I tried to use the Highlight Range of Dates option but it seems to highlight a fixed value or range instead of a dynamic one as the mouse-selected cell.

TienDatTran-wb
Автор

When I do this on a brand new Workbook, it works. But for workbooks I have already created, it doesn't. Any ideas?

felge
Автор

Amazing. Thank you so much for this very useful tip indeed. I have been searching exactly for this type of cell behavior for ages. All I got was garbage till now. Thanks again, much appreciated.

MojoJojo-zt
Автор

BRILLIANT! I WAS SO DESPRATE BECAUSE I COULDNT DO THIS, BUT YOU SAVED ME THANK YOU SO MUCH

cps
Автор

Excel for web comment was what I was looking for - timesaver! Thank you - Subscribed!

jesstures
Автор

help - I added the code and it works great for the calendar but now the "undo" function does not work on the sheet with the code. Any thoughts how to use undo with this code?

davypettit
Автор

Thank you for simple but great video. Mine the calendar was default highlight a fixed date so how can I make it highlight on selected date?

emilytran
Автор

Rebekah this is what I was looking for, however, my calendar does not disapear. I am using the same code that you posted. Can you help please?

MSpence
Автор

What is the macro code that you use to run the VBA? For my Microsoft 365 I am being prompted to run a macro with my VBA

christinaperry
Автор

Do you know how I can change this so the calendar appears to the left of the active cell instead?

BoboWilliam-vtlr
Автор

This is nice, watched other Tutorials and they were good too. This one behaves as i wanted. Thank You for sharing.

MuhammadAli-suoo
Автор

Hey, Thanks for the big help! Really appreciate it! But I would like to share that if I try to change the date format in the code, it doesn't work. Can you please resolve it?!

ehsanulrakib
Автор

Well done. I was looking for this solution everywhere. Only your video provides the required solution. Thank you.

romajaan
Автор

I’ve been trying to figure this out all day, then I found my new best friend 😁 and it’s so cool !! Thank you!!

glennfirmin
Автор

Im getting and error in this line of the code = True". I dont understand why lol

automan
Автор

Hi, this is awesome work. I just found you on my YouTube feed but i am happy i did. I am beginner freelancer with exxel being my tool of business.

This video is super useful

sidrajamal