by Patrick Lockefeer (II) (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 24th July 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Fast way to enter Dates in a Listbox with the Calendar control
API Declarations
Controls :
Calendar : Add control >> Components >> Microsoft Calendar control 8.0
Calendar name : Calendar1
ListBox name : List1
'3 possibilities :
'1.Date only
List1.AddItem (Format(Calendar1, "d"))
'or
'2.Date & Month
List1.AddItem (Format(Calendar1, "d" & "/" & "m"))
'or
'3.Date & Month & Year
List1.AddItem (Format(Calendar1, "d" & "/" & "m" & "/" & "yy"))