Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this userform. In some textboxes I need to input dates in a short
format (i.s. 01aug) The receiving cell in my worksheet has been correctely formatted to display the date (01-aug-06). In fact when I input the date without using the userform it works ok but when I do this using the userform the display is exactely like the input (01aug). Any idea on how to fix this problem? This is the formula I use: Sheets("AB").Cells(16, 12).Value = In.Text Sheets("AB").Cells(18, 12).Value = Out.Text When I use the program at home (in english) all works correctly, at the office (italian) I get this problem. Thanks for any help or suggestion |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why not use two dropdowns
on for the days and one for the month Sheets("sheet1").Range("A20").Value = Format(DateSerial(Year(Date), Me.TextBox1, Me.TextBox2), "dd-mmm-yy") This avoid input errors also and problems with dmy or mdy Or use a calendarcontrol http://www.rondebruin.nl/calendar.htm -- Regards Ron de Bruin http://www.rondebruin.nl "antonov" wrote in message ... I have this userform. In some textboxes I need to input dates in a short format (i.s. 01aug) The receiving cell in my worksheet has been correctely formatted to display the date (01-aug-06). In fact when I input the date without using the userform it works ok but when I do this using the userform the display is exactely like the input (01aug). Any idea on how to fix this problem? This is the formula I use: Sheets("AB").Cells(16, 12).Value = In.Text Sheets("AB").Cells(18, 12).Value = Out.Text When I use the program at home (in english) all works correctly, at the office (italian) I get this problem. Thanks for any help or suggestion |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Ron, I've tried to use your calendarcontrol but it give me an error
message... "Run-time error '438': Object doesn't support this property or method... The reason why I use the combobox is that I need my colleagues to input the dates from this form and not directly in the sheet this to avoid errors or differences in formats "Ron de Bruin" wrote in message ... Why not use two dropdowns on for the days and one for the month Sheets("sheet1").Range("A20").Value = Format(DateSerial(Year(Date), Me.TextBox1, Me.TextBox2), "dd-mmm-yy") This avoid input errors also and problems with dmy or mdy Or use a calendarcontrol http://www.rondebruin.nl/calendar.htm -- Regards Ron de Bruin http://www.rondebruin.nl "antonov" wrote in message ... I have this userform. In some textboxes I need to input dates in a short format (i.s. 01aug) The receiving cell in my worksheet has been correctely formatted to display the date (01-aug-06). In fact when I input the date without using the userform it works ok but when I do this using the userform the display is exactely like the input (01aug). Any idea on how to fix this problem? This is the formula I use: Sheets("AB").Cells(16, 12).Value = In.Text Sheets("AB").Cells(18, 12).Value = Out.Text When I use the program at home (in english) all works correctly, at the office (italian) I get this problem. Thanks for any help or suggestion |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See if this might work:
Sheets("AB").Cells(16, 12).Value = Datevalue(In.Text) Sheets("AB").Cells(18, 12).Value = Datevalue(Out.Text) HTH. Best wishes Harald "antonov" skrev i melding ... I have this userform. In some textboxes I need to input dates in a short format (i.s. 01aug) The receiving cell in my worksheet has been correctely formatted to display the date (01-aug-06). In fact when I input the date without using the userform it works ok but when I do this using the userform the display is exactely like the input (01aug). Any idea on how to fix this problem? This is the formula I use: Sheets("AB").Cells(16, 12).Value = In.Text Sheets("AB").Cells(18, 12).Value = Out.Text When I use the program at home (in english) all works correctly, at the office (italian) I get this problem. Thanks for any help or suggestion |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Userform Error | Excel Discussion (Misc queries) | |||
userform error? | Excel Programming | |||
userform error | Excel Programming | |||
error in userform | Excel Discussion (Misc queries) | |||
userform error | Excel Programming |