Excel Macro - Keystroke

E

eric

Hi,

How do I integrate a keystroke on my recorded macro.. For instance...

I would like to create a macro which when you run, it automatically enters
the current time on a fixed cell. I know that ctrl+shift+; will enter the
current time in the cell but I cant seem to record that keystroke on a macro.

Thanks,
Eric
 
L

Luke M

Rather than using keystrokes which is genearlly frowned upon (although it
could be done with SendKeys) simply have your macro state something like:

Range("A2") = TimeValue(Now)
 
E

eric

works like a charm.. Thanks Luke!

Luke M said:
Rather than using keystrokes which is genearlly frowned upon (although it
could be done with SendKeys) simply have your macro state something like:

Range("A2") = TimeValue(Now)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*
 

Ask a Question

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.

Ask a Question

Top