Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Desperation is Setting in - Date Formats! :-(
I have a series of UserForms capturing and writing data to an worksheet,
trouble is no matter how I format anything cannot get the format of a date entered in the UserForm to match the worksheet formats. ie When I enter 05/02/06 (5th Feb 06)on the UserForm it is transposed to 02/05/06 (2nd May 06) on the worksheet! Am I going nuts or is there a way to get around this - it's seriously knocking my plug in now! -- Zani (if I have posted here, I really am stuck!) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Desperation is Setting in - Date Formats! :-(
Hi Zani
You have to set right format on cells Regads Yngve |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Desperation is Setting in - Date Formats! :-(
Hi, no that's not it. the cell formats are OK, it is something weird to do
with VB being in US format, and I am working in UK format - am so confused!!!! -- Zani (if I have posted here, I really am stuck!) "Yngve" wrote: Hi Zani You have to set right format on cells Regads Yngve |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Desperation is Setting in - Date Formats! :-(
Hi Zani,
Try: Range("A1").Value = CDate(Me.TextBox1.Value) --- Regards, Norman "Zani" wrote in message ... I have a series of UserForms capturing and writing data to an worksheet, trouble is no matter how I format anything cannot get the format of a date entered in the UserForm to match the worksheet formats. ie When I enter 05/02/06 (5th Feb 06)on the UserForm it is transposed to 02/05/06 (2nd May 06) on the worksheet! Am I going nuts or is there a way to get around this - it's seriously knocking my plug in now! -- Zani (if I have posted here, I really am stuck!) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Desperation is Setting in - Date Formats! :-(
Zani,
For a previous posting (thanks to Tom Ogilvy): Private Sub textbox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) Range("a1") = CDate(TextBox1.Text) Range("a1").NumberFormat = "dd/mm/yy" End Sub I am UK-Based and share your frustration. HTH End Sub"Zani" wrote: Hi, no that's not it. the cell formats are OK, it is something weird to do with VB being in US format, and I am working in UK format - am so confused!!!! -- Zani (if I have posted here, I really am stuck!) "Yngve" wrote: Hi Zani You have to set right format on cells Regads Yngve |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Desperation is Setting in - Date Formats! :-(
Hi Zani
TextBox1.Value = Format(TextBox1.Value, "dd-mmm-yyyy") Regards Yngve |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Desperation is Setting in - Date Formats! :-(
Thanks chaps - your posts came just in time to stop me throwing myself off
the roof - I thought I was going nuts! One to remember for the future me thinks. Thanks again - only hope I will be knowledgeable enough one day to help people in return. -- Zani (if I have posted here, I really am stuck!) "Norman Jones" wrote: Hi Zani, Try: Range("A1").Value = CDate(Me.TextBox1.Value) --- Regards, Norman "Zani" wrote in message ... I have a series of UserForms capturing and writing data to an worksheet, trouble is no matter how I format anything cannot get the format of a date entered in the UserForm to match the worksheet formats. ie When I enter 05/02/06 (5th Feb 06)on the UserForm it is transposed to 02/05/06 (2nd May 06) on the worksheet! Am I going nuts or is there a way to get around this - it's seriously knocking my plug in now! -- Zani (if I have posted here, I really am stuck!) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Setting default formats | Excel Discussion (Misc queries) | |||
GETPIVOTDATA....Excel 2000....Desperation! | Excel Worksheet Functions | |||
Setting up templates with formats | Excel Discussion (Misc queries) | |||
VBA Setting .Value to a date does not respect local system setting | Excel Programming | |||
Index / Match - desperation | Excel Programming |