Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing Regional Settings from VBA
Hi there
Is it possible to change the date format to "dd-mm-yyyy" in the Control Panel/ Regional Settings? Thanks Michael |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing Regional Settings from VBA
Michael,
I would *strongly* recommend that you do NOT do this. These setting affect all Windows applications, possibly with bad side effects. Your application should NEVER change any setting outside of Excel. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Michael Rekas" wrote in message ... Hi there Is it possible to change the date format to "dd-mm-yyyy" in the Control Panel/ Regional Settings? Thanks Michael |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing Regional Settings from VBA
Hi Chip
The situation is that there are ±60 workstations countrywide. Some are configured yyyy/mm/dd, some mm/dd/yyyy and & most dd-mm-yyyy. The reports thus have different date formats depending on which branch is producing it. A further problem is that there is a routine which extracts data from an SQL database where the date is in text format. The routine works fine on the dd-mm-yyyy workstations but is unpredictable on the others. Today 16 May 2004 appears as 04-05-2016 rather than 16-05-2004. We need for everyone in the organisation to set their Short Date to this format. I thought that it would just be easier to use Excel to do this rather than to rely on users (in our case many not that computer literate) to click Start, Settings Control Panel or Start Control Panel depending on their version. Accordingly any other ideas would be appreciated. Thanks Michael On Sat, 15 May 2004 08:07:55 -0500, "Chip Pearson" wrote: Michael, I would *strongly* recommend that you do NOT do this. These setting affect all Windows applications, possibly with bad side effects. Your application should NEVER change any setting outside of Excel. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing Regional Settings from VBA
Michael Rekas wrote ...
The situation is that there are ±60 workstations countrywide. A further problem is that there is a routine which extracts data from an SQL database where the date is in text format. We need for everyone in the organisation to set their Short Date to this format. If you have a business need to change the all machines' regional settings, regardless of your Excel project, then do it as a separate project. As regards your Excel project, in your SQL query you should use the CAST function to convert from text to a date on the server i.e. before it arrives into your workbook. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel not using regional settings | Excel Discussion (Misc queries) | |||
Regional settings | Excel Worksheet Functions | |||
Regional Settings with Date | Excel Discussion (Misc queries) | |||
regional settings | Excel Worksheet Functions | |||
Regional Settings | Excel Discussion (Misc queries) |