Solved

While.... Wend problem

Posted on 2014-02-06
7
107 Views
Last Modified: 2014-02-13
Hi, in the attachment, I have a Macro Button called "Test" which populates amongst others in Column AI a field called "Date of Break". For some reason, the rows highlighted in the attachment have populated American-style dates, instead of European. Can anyone tell me why?
DummyRec2.xlsm
0
Comment
Question by:Justincut
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 27

Assisted Solution

by:MacroShadow
MacroShadow earned 500 total points
ID: 39840143
Try setting the format of the cells using
Cells(x, x).NumberFormat = "dd/mm/yyyy"
0
 
LVL 19

Expert Comment

by:Ken Butters
ID: 39840459
Do you need to change your locale settings?

go to control panel... select Region and Language Options...

there under the formats tab, you should be able to select the local you want... and then modify specific formats if they are not what you expect....

So for example you may want to select

English (United Kingdom)  rather than English (United States).

After that, you can still choose various formats as defaults for your date settings.
0
 

Author Comment

by:Justincut
ID: 39840498
I do not understand as only 6 rows in 300 rows shows the Date in American Format.Please look at the attachment to tell me why its only a minority of Cells.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 27

Expert Comment

by:MacroShadow
ID: 39840516
My guess would be that the other ones were entered as text and those were entered as dates, hence they are influenced by the locale settings.
0
 
LVL 19

Expert Comment

by:Ken Butters
ID: 39840536
Is it possible that the workbook was created on a different machine with locale settings set to UK.... and then when you ran the macro... it used your locale settings of United States?
0
 

Author Comment

by:Justincut
ID: 39854789
I've requested that this question be closed as follows:

Accepted answer: 0 points for Justincut's comment #a39840498

for the following reason:

Excelent
0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 39854790
What???
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question