Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default 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
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
Excel not using regional settings Dweezil38 Excel Discussion (Misc queries) 6 March 15th 11 08:50 AM
Regional settings Ana via OfficeKB.com Excel Worksheet Functions 1 October 27th 09 02:41 PM
Regional Settings with Date [email protected] Excel Discussion (Misc queries) 3 November 20th 07 06:50 PM
regional settings Spike Excel Worksheet Functions 5 July 29th 07 01:10 AM
Regional Settings LAF Excel Discussion (Misc queries) 2 July 30th 05 12:51 PM


All times are GMT +1. The time now is 09:41 AM.

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

About Us

"It's about Microsoft Excel"