Complex date VBA - insert a certain weekday
In article , Ron Rosenfeld
writes
By adding the text string, you have converted the entire value into text, so the date
being displayed
is probably your windows regional short date (that's just a guess).
If you want to ensure the date is displayed in the cell how you want, you should
format the cell
appropriately.
e.g. ...
.value = Date + 8 - weekday(Date+5)
.numberformat = "dddd dd mmm yyyy"
Hi Ron
OK thanks for that. That's fixed it in the desired format.
The cell now curiously refuses to wrap the text for some reason , but
I'll continue to fiddle with it so it's not too wide for the other cells
in the sheet.
Best Wishes
|