> I am but a poor novice working on an iMac.
>
> CMD- gives me the date
> CMD; gives me the time
> CMD-; gives me a literal I can not use
One convention for writing key combinations is to use a hyphen to
separate the keys. So I meant CMD-; to be the semicolon key while
holding down CMD.
> On the Macro which I created using "record new Macro", (1) those steps
> gave me a time stamp but activating the Macro did not, (2) I went back
> and edited the Macro to change E32 to D32 as you suggested but that
> gave the same result as before.
I wasn't suggesting changing E32 to D32. I was saying that the selection
was the cause of your problem - if you didn't want to use my
alternative, you should take out both the
Range("D32").Select
and the
Range("E32").Select
statements.
> I assume "XL function" means Macro.
No it means Excel Function. For instance =NOW().
> I don't know what VBA is, nor
> understand what you mean by using the "Time method".
Visual Basic for Applications (VBA) is the language that macros are
written or recorded in. Your recorded macro is an example of VBA.
VERY roughly - commands in VBA that return values are called methods.
So what I was suggesting is that instead of inserting the Excel Function
NOW() into the cell, then copying and paste special-ing, that it was
easier to insert the value from VBA's built-in Time function/method.
That doesn't mean your approach was wrong (except for changing the
selected cell in the middle). There are almost always multiple ways to
accomplish a process in XL & VBA.
> I guess you must think I am stupid
Nope - just ignorant about VBA. Ignorant's a lot better than stupid -
I'm ignorant about nearly everything. VBA just happens to be one of the
things I know something about.
> but all I want to do is have a
> simple way of time stamping a cell.
>
> And I still have no idea of how to do that.
Easiest: Type CMD and ; keys
If you want to record seconds, or a particular format, paste this macro
into a regular code module in your Personal Macro Workbook:
Public Sub TimeStamp()
With ActiveCell
.Value = Time
.NumberFormat = "[hh]:mm:ss"
End With
End Sub
(or substitute your favorite time format).
For more on where to put your code, see
http://www.mcgimpsey.com/excel/modules.html
and
http://www.mvps.org/dmcritchie/excel/getstarted.htm
(gives examples for WinXL - substitute MacXL's "Personal Macro Workbook"
for the references to WinXL's "Personal.xls")
Hi -
I'm just butting in for clarification here because your last message seems
to contradict itself:)
On the one hand you confirm that John's suggestion works:
> CMD; gives me the time
Then you end with the statements:
> - but all I want to do is have a
> simple way of time stamping a cell.
>
> And I still have no idea of how to do that.
By "time stamping" a cell, do you mean having the current time entered into
the cell or do you mean having some way of *tracking* the time at which
canges to the cell were made? The latter is a whole different kettle of
fish. [BTW, the CMD-; is one means of denoting Command Key along with the ;
key, also frequently written as CMD+;]

Signature
Regards |:>)
Bob Jones
[MVP] Office:Mac
storm - 24 Sep 2007 18:30 GMT
> Hi -
>
[quoted text clipped - 21 lines]
> Bob Jones
> [MVP] Office:Mac
Mr. Jones:
CMD- gives me the date without the time
CMD; gives me the time without the date
CMD-; gives me a literal I cannot do math on
Mr. McGimpsey:
I went back and edited out the cell references and that works:
ActiveCell.FormulaR1C1 = "=NOW()"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
End Sub
Thanks to both of you for your help,
Bill Garnett
Midlothian, VA