Solved

While.... Wend problem

Posted on 2014-02-06
7
96 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 26

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 26

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 26

Accepted Solution

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

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
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 longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

707 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