Time Stamp
Try:
Sub test()
Application.DisplayAlerts = False
With ActiveCell
.NumberFormat = "@"
.Value = Format(Now(), "yymmddhhmm")
End With
Application.DisplayAlerts = True
End Sub
RBS
"John Pierce" wrote in message
oups.com...
Thanks RB, that looks good, except for one itty-bitty problem.
In Excel 2003 it causes one of those usually-very-helpful
but sometimes-annoying error flags - in this case telling
me what I already know - that "The number in this cell is
formatted as text or is preceded by an apostrophe." Is
there anyway to programmatically prevent this, some
built-in error-checking. I tried recording the steps
involved in opening the message and selecting
"Ignore error" but nothing was recorded.
|