Hello all,
Any ideas why the Format function won’t work?
I collect a date via an userform and when I try to output it to a spread sheet it changes the format randomly.
I tried to use unsuccessfully the format function to correct this.
Tried both the lines. No success so far L
I want the date to be stored always in the dd/mm/yyyy format
thx
Any ideas why the Format function won’t work?
I collect a date via an userform and when I try to output it to a spread sheet it changes the format randomly.
I tried to use unsuccessfully the format function to correct this.
Code:
With ws
.Cells(iRow, 2).Value = Format(Me.DateBox.Value, "dd/mm/yyyy")
.Cells(iRow, 2) = Format(.Cells(iRow, 2), "dd/mm/yyyy") 'formats Cells containing a DATE in dd/mm/yyyy format
.Cells(iRow, 2).HorizontalAlignment = xlLeft 'formats Cell containing a DATE
I want the date to be stored always in the dd/mm/yyyy format
thx