Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    May 2002
    Location
    Loveland, Ohio, USA
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello,

    I am trying to configure a spreadsheet to allow the user to enter a date to track when people arrive and leave. The Now() function will update. I was trying to use Now in a function by creating a Module in my spreadsheet (Excel 2007)

    Function StaticDate()
    ' Returns static date
    StaticDate = Now
    End Function

    This function works, but I want to assign it to a keyboard shortcut, but I can not figure out how to do that in Excel 2007

    Is my function the easiest way to add the static date?

    Thanks,

    Andy

  2. #2
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,015
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Is that to put today's date into a cell?
    If it is then just use CTRL ; and SHIFT CTRL :

    CTRL; = Date SHIFT CTRL : = Time

    Failing that you can use a Macro to Insert the Date and Time from Now into the Active Cell

    Code:
    Sub TimeNow()
         ActiveCell=Now
    End Sub
    You can then Add this to a KeyBoard ShortCut
    by going into Tools => Macro => Macros Selecting the Macro and then pressing the Options Button

    In 2007 that is

    Developer Ribbon => Macros then as Above

    Tip Use SHIFT CTRL T for example to stop overriding the normal Shortcut keys

    Also, IF you put the Macro into their Personal Macro Workbook, it would be available for ALL their spreadsheets.
    Andrew

  3. #3
    Star Lounger
    Join Date
    May 2002
    Location
    Loveland, Ohio, USA
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks! I hate it when I am off in left field

    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •