List Box Time Format

197574

New Member
Joined
Feb 3, 2005
Messages
7
I have a lisbox in a userform that has a list of times which are pulled from the excel worksheet. When the user selects the time of choice I get the decimal value for the time selected not the formatted time I would like. I'm probable missing something easy any help on the formatting would be greatly appreciated.

Thanks

Mike....
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Are you populating the listbox with the Row Source property, or the AddItem method?

For the latter, use something like this:

Me.ListBox2.AddItem Format(Sheet1.Cells(n, 1), "h:mm")
 
Upvote 0
Listbox Time Format

I am using a ComboBox instead of a listbox. Sorry for the error. I messed with the line of code a litte and still I'm having trouble. Thanks for the reply...

Mike....
 
Upvote 0

Forum statistics

Threads
1,215,334
Messages
6,124,325
Members
449,154
Latest member
pollardxlsm

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