Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel database with dates in the format
dd/mm/yyyy. If I select the Data | Form option from the standard menu bar, the dates look fine. If I activate the DataForm through VBA with the above command, the dates display as mm/dd/yyyy. I can overwrite the date using the Data Form in the correct format, then scroll back to that record and it still displays as mm/dd/yyyy. Underlying data is fine, just the display on the Data Form when called using VBA is incorrect. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes Indeed interesting :(....
Will try to dig out a bit... but looks like some setup issue RichardS wrote: I have an Excel database with dates in the format dd/mm/yyyy. If I select the Data | Form option from the standard menu bar, the dates look fine. If I activate the DataForm through VBA with the above command, the dates display as mm/dd/yyyy. I can overwrite the date using the Data Form in the correct format, then scroll back to that record and it still displays as mm/dd/yyyy. Underlying data is fine, just the display on the Data Form when called using VBA is incorrect. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Grüezi Richard
RichardS schrieb am 19.05.2004 I have an Excel database with dates in the format dd/mm/yyyy. If I select the Data | Form option from the standard menu bar, the dates look fine. If I activate the DataForm through VBA with the above command, the dates display as mm/dd/yyyy. I can overwrite the date using the Data Form in the correct format, then scroll back to that record and it still displays as mm/dd/yyyy. Underlying data is fine, just the display on the Data Form when called using VBA is incorrect. When you activate the DataForm by VBA Excel will use the US-Format to display dates - aour issue is a typical regional-settings problem. I think you don't have US-regional-settings? Instead of something like this ActiveSheet.ShowDataForm try the following: ActiveSheet.UsedRange.Cells(1, 1).Activate Application.CommandBars.FindControl(ID:=860).Execu te You have to select first *1* cell within the datarange of your worksheet. Thats what the first line is for. If you already know cour range you can activate a cell directly by its address. -- Regards Thomas Ramel - MVP for Microsoft-Excel - [Win XP Pro SP-1 / xl2000 SP-3] |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() -----Original Message----- Grüezi Richard RichardS schrieb am 19.05.2004 I have an Excel database with dates in the format dd/mm/yyyy. If I select the Data | Form option from the standard menu bar, the dates look fine. If I activate the DataForm through VBA with the above command, the dates display as mm/dd/yyyy. I can overwrite the date using the Data Form in the correct format, then scroll back to that record and it still displays as mm/dd/yyyy. Underlying data is fine, just the display on the Data Form when called using VBA is incorrect. When you activate the DataForm by VBA Excel will use the US-Format to display dates - aour issue is a typical regional-settings problem. I think you don't have US-regional-settings? Instead of something like this ActiveSheet.ShowDataForm try the following: ActiveSheet.UsedRange.Cells(1, 1).Activate Application.CommandBars.FindControl(ID:=860).Exec ute You have to select first *1* cell within the datarange of your worksheet. Thats what the first line is for. If you already know cour range you can activate a cell directly by its address. -- Regards Thomas Ramel - MVP for Microsoft-Excel - [Win XP Pro SP-1 / xl2000 SP-3] . Thomas, Thank-you very much. Works like a charm Regards Richard |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Grüezi Richard
RichardS schrieb am 20.05.2004 Thank-you very much. Works like a charm I'm glad aou like it :-) -- Regards Thomas Ramel - MVP for Microsoft-Excel - [Win XP Pro SP-1 / xl2000 SP-3] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
from date format convert to text format is wrong | Excel Discussion (Misc queries) | |||
date in wrong format | New Users to Excel | |||
Date in wrong format | Excel Discussion (Misc queries) | |||
Wrong date format in header | Excel Discussion (Misc queries) | |||
YYYY format displaying wrong date | Excel Discussion (Misc queries) |