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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,367
Office Version
  1. 365
Platform
  1. Windows
What do you mean they don't 'match'?
 
Upvote 0

faliero

New Member
Joined
May 13, 2005
Messages
42
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

rs2k

Well-known Member
Joined
Aug 15, 2004
Messages
1,413
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,195,855
Messages
6,011,973
Members
441,658
Latest member
Carlos O

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
Top