+ Reply to Thread
Results 1 to 9 of 9

Jump to todays date function.

  1. #1
    Registered User
    Join Date
    03-12-2007
    Posts
    33

    Jump to todays date function.

    Hi all,

    I have a timetable spreadsheet. the dates are formatted as yyyy-mm-dd.

    Is there a way for the active cell to jump to the current date on the spreadsheet once opened, or maybe create a button to jump to todays date?

    Thanks,
    Jaz

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Quote Originally Posted by Jazmania
    Hi all,

    I have a timetable spreadsheet. the dates are formatted as yyyy-mm-dd.

    Is there a way for the active cell to jump to the current date on the spreadsheet once opened, or maybe create a button to jump to todays date?

    Thanks,
    Jaz
    Hi,

    Simplest way would be to have a macro in the Workbook Open event which identifies the current date, and then finds that date in the spreadsheet with the standard VBA FIND statement.

    HTH

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    You can use a workbook open or a worksheet activate macro that will select the required row

    The following macro is run when the workbook is opened as long as your macro security is not set to high


    'These instructions pre typed & are worded to cater for the novice programmer

    'To install macro to correct location

    'Copy this macro
    'GoTo Excel
    'Open VB Editor by pressing Alt + F11
    'Just below the menus & toolbars on the left you should see Project - VbaProject window
    'In this window you will see ThisWorkbook
    'double click on ThisWorkbook - opens ThisWorkbook module sheet
    'Paste macro code into big window on right


    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Registered User
    Join Date
    03-12-2007
    Posts
    33
    Hey mudraker,

    Followed your instructions and coppied in your code and ran... Getting compile error, Named argument not found on SearchFormat:=

  5. #5
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    I am not sure what is causing the error. It could be because you are using an older version of Excel that I am and that command is not reconised by your version

    try this cut down version of the find command

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-12-2007
    Posts
    33
    Hi,
    Thanks for that. New functions didn't seem to work when I opened the worksheet so I just added it to a button which will do nicely..

  8. #8
    Registered User
    Join Date
    03-12-2007
    Posts
    33
    Hey,
    Is there a way of having the entire row selected once the current date is found?
    Is it something like active.row

  9. #9
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1