This actually puts a value into the cell and excel may change the format to
something it likes better.
This may be better:
Option Explicit
Private Sub Workbook_Open()
With Sheets("Sheet1").Range("A1")
If .Value = "" Then
.value = date 'doesn't include the time
.numberformat = "ddmmmyy"
end if
End With
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.