Solved

While.... Wend problem

Posted on 2014-02-06
7
100 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

756 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