View Single Post
 
Old 05-09-2023, 01:58 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 875
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default Setting "dd.mm.yyyy" date format for Excel column doesn't work properly!

Code:
...
Dim fs As Object
Dim fo As Object
Dim strTargetSheet As String 
...
Set fs = CreateObject("Excel.Application")
Set fo = fs.Workbooks.Add
fo.Sheets("Sheet1").Name = strTargetSheet
...
fo.Sheets(strTargetSheet).Columns("F").NumberFormat = "dd.mm.yyyy"
...
The format of column F is "dd\.mm\.yyyy" instead of "dd.mm.yyyy"!
Reply With Quote