Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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!* "eric" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
or simply,
Range("A2") = Time "Now" is used if you need the date. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Luke M" wrote: 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!* "eric" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
works like a charm.. Thanks Luke!
"Luke M" wrote: 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!* "eric" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro, shortcut keystroke for Hyperion Add-In | Excel Discussion (Misc queries) | |||
Tab Keystroke in Excel | Excel Discussion (Misc queries) | |||
Tab Keystroke in Excel | Excel Discussion (Misc queries) | |||
How do I get Excel filename using a single keystroke | Excel Worksheet Functions | |||
Is there a keystroke shortcut to Group and Outline in Excel? | Excel Discussion (Misc queries) |