Solved

While.... Wend problem

Posted on 2014-02-06
7
97 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
macro for active word document 4 39
Office 2016 Excel Issue 4 26
Excel macro runs twice 13 47
Help with Excel formula 6 35
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now