![]() |
Excel date input inconsistancy
I have created a spreadsheet for data collection which is utilising
userforms for this purpose. The data is for the last financial year (06-07) and the date options in the combo box reflect this (using month only) When selected though the year changes to 07 from 06 (ie April 06 as selected becomes April 07) How can I rectify this? |
Excel date input inconsistancy
Need to see the code. Probably some place Datevalue() function is used and
wrong year was put in the function. "PhilM" wrote: I have created a spreadsheet for data collection which is utilising userforms for this purpose. The data is for the last financial year (06-07) and the date options in the combo box reflect this (using month only) When selected though the year changes to 07 from 06 (ie April 06 as selected becomes April 07) How can I rectify this? |
Excel date input inconsistancy
Code is
ComboBox2.Value = Format(ComboBox2.Value, "mmm-yy") |
Excel date input inconsistancy
This is not a combobox problem, it is your format statement. The same
problem would occur with mydate = "06-07" mydate = Format(mydate, "mmm-yy") The problem is with the "mmm". Change to "mm". Also note the months are first and the year is second. "PhilM" wrote: Code is ComboBox2.Value = Format(ComboBox2.Value, "mmm-yy") |
All times are GMT +1. The time now is 02:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com