Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Excel Macro - Keystroke

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Excel Macro - Keystroke

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Excel Macro - Keystroke

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Excel Macro - Keystroke

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro, shortcut keystroke for Hyperion Add-In [email protected] Excel Discussion (Misc queries) 0 May 2nd 07 01:58 AM
Tab Keystroke in Excel Snakeoids Excel Discussion (Misc queries) 1 April 17th 07 07:10 AM
Tab Keystroke in Excel Snakeoids Excel Discussion (Misc queries) 2 April 13th 07 11:04 PM
How do I get Excel filename using a single keystroke David Excel Worksheet Functions 5 October 19th 06 09:18 PM
Is there a keystroke shortcut to Group and Outline in Excel? jocapo Excel Discussion (Misc queries) 2 April 20th 06 01:20 AM


All times are GMT +1. The time now is 12:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"