Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default ShowDataForm Date format wrong

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default ShowDataForm Date format wrong

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default ShowDataForm Date format wrong

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default ShowDataForm Date format wrong


-----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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default ShowDataForm Date format wrong

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
from date format convert to text format is wrong nooris Excel Discussion (Misc queries) 2 February 4th 10 03:41 PM
date in wrong format Mike New Users to Excel 3 November 15th 08 08:42 PM
Date in wrong format GKW in GA Excel Discussion (Misc queries) 6 February 19th 08 03:21 PM
Wrong date format in header Curt Charles PDX Excel Discussion (Misc queries) 1 October 25th 06 10:42 PM
YYYY format displaying wrong date Blaise Excel Discussion (Misc queries) 3 October 12th 05 02:28 AM


All times are GMT +1. The time now is 10:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"