Datepicker in a listbox/listview second column

Grand

Board Regular
Joined
May 11, 2017
Messages
52
Hi
Is possible to have a datepicker (or maybe just another control like button etc) in a listox or listvew control for every item? And if yes, how is that done.

Thanks for any hit/help.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
In Developer Mode
1. Right Click on the listbox
2.Choose Properties
3. Choose List Style
4. Choose List Style Options
See if that is what you want.
Works with Userform and Activex Listbox
 
Upvote 0
Hey, thanks for the quick reply. Yes, it is on a userform. The Option style gives a checkbox where itmes can be checked. I however, would like to add a date for each item in the list. I thoughtof a datepicker control but I am not sure how to add control to each item onfor example the second column of the lsitbox. Is that possible?
 
Upvote 0
I do not have a DatePicker Control and have never used one.

The checkbox is not a column in the listbox.

So If you want dates entered into The Listbox you could use a script like this:
This script will put Todays date and 10 days into the future into the listbox.

Put this script in your UserForm
Code:
Private Sub UserForm_Initialize()
'Modified  10/1/2018  5:03:46 AM  EDT
Dim i As Long
    For i = -1 To 10
        ListBox1.AddItem DateAdd("d", i + 1, Date)
    Next
End Sub
 
Upvote 0
Datepicker can be added; it is not a standard control.
What I exactly need is that for every item in the listbox a date can be entred. It could be other ways of doing it but I thought either a datepicker or just a textbox to enter a date manually. The date is going to be different for each item, is unique and can be one or many based on how many items are listed in the listbox. Is that possible?
 
Last edited:
Upvote 0
Yes thanks. I know DatePicker can be added but I have not done so.

I'm not sure what your asking for.
Sounds to me like you want to add items to a ListBox and then in column 2 of the listbox you want some date entered.

What items are being added to the listbox column(1)?

What is your ultimate goal here?
After adding all theses value to column (1) of the listbox and then adding dates to column(2) of the listbox

What do you plan to do with this?
 
Upvote 0
You can't add a DatePicker to a listbox in VBA.

Why not use the listbox DblClick event to pop a datepicker and then add the selected date to the row that was double clicked.
 
Upvote 0
Yes thanks. I know DatePicker can be added but I have not done so.

I'm not sure what your asking for.
Sounds to me like you want to add items to a ListBox and then in column 2 of the listbox you want some date entered.

What items are being added to the listbox column(1)?

What is your ultimate goal here?
After adding all theses value to column (1) of the listbox and then adding dates to column(2) of the listbox

What do you plan to do with this?

Sorry about being unclear. What you described is more and less what I want to be able to do. So my listbox is filled with some items (some data from an array I have) which are based on a values of a dropdown box. So far I could manage.
The next thing is to add an individual date for each item in that listbox.The info, that is the item list including date for each item, is then sent by email to a pedefined address.
 
Upvote 0
You can't add a DatePicker to a listbox in VBA.

Why not use the listbox DblClick event to pop a datepicker and then add the selected date to the row that was double clicked.
Tha is actually a good idea. So my listbox will have two columns; column one is filled out with my data, column two is initilly empty. Uppon dobble-clicking on a specfic row a small user form pops-up in which I can place my famous datepicker. I think I will persue this path and see how far I can get.
 
Upvote 0

Forum statistics

Threads
1,223,892
Messages
6,175,236
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top