dispelthemyth
Well-known Member
- Joined
- Mar 16, 2006
- Messages
- 664
- Office Version
- 365
- Platform
- Windows
When i manually open an excel file i can see a date in a cell (D9) that is 09/03/2023 (i.e. 9th March 2023 in UK date format)
When i use VBA to open the same workbook the date in cell D9 is 03/09/2023 (It does it to all days that can convert, i.e. where the Day and Month are both <= 12)
Is there a reason for the date format changing and a way to stop it?
The above is the line of code I use to open the workbook
When i use VBA to open the same workbook the date in cell D9 is 03/09/2023 (It does it to all days that can convert, i.e. where the Day and Month are both <= 12)
Is there a reason for the date format changing and a way to stop it?
VBA Code:
Set wbk = Workbooks.Open(sFolder & fileName, ReadOnly:=True, Local:=True)
The above is the line of code I use to open the workbook