ComboBox Value

faliero

New Member
Joined
May 13, 2005
Messages
42
My ComboBox is filled with dates

Mar 00
Apr 00
May 00
Jun 00
Jul 00
Aug 00
Sep 00
Oct 00
Nov 00
Dec 00
Jan 01
Feb 01
Mar 01
Apr 01
May 01
Jun 01
Jul 01
Aug 01
Sep 01
Oct 01
Nov 01

I have a problem with dates after Dec 00, the date in Cells(1,18) doesn't match anymore after Dec 00 :cry: :cry: :cry: :cry: . I am using the following code

Code:
Cells(1, 18).Value = CapsuleStartComboBox.Value


thanks for any help
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
What do you mean they don't 'match'?
 
Upvote 0
Sorry, I wasn't clear
I'm using
Code:
Private Sub CapsuleStartComboBox_Change()   
    Cells(1, 18).Value = CapsuleStartComboBox.Value
End Sub

If I change the combobox to Jan 01 I get Jan 05 in cells(1,18)

thanks
 
Upvote 0
Failero,
I have had similar problems with 'times' in a combo box, the way I got round it was to format the 'times' as text and when the data was sent to the worksheet it was converted back to a time format. Don't quote me, but, I think it has something to do with the way Excel handles dates, (I had 12:00 for midday, but the Cbox displayed it as 00:05, similar to your Jan 01 displaying as Jan 05)

This is the link,
http://www.mrexcel.com/board2/viewtopic.php?t=177387&highlight=

My VB is not brilliant, but I will try and help, if this is the way you want to go,

Cheers
Colin.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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