+ Reply to Thread
Results 1 to 6 of 6

Add date in next free cell upon button click

  1. #1
    Registered User
    Join Date
    08-08-2007
    MS-Off Ver
    Excel 2010
    Posts
    53

    Add date in next free cell upon button click

    I'd like to write a macro that will add the current date when a button is clicked.

    ex: in sheet1 I have a button that runs a macro when clicked.
    on sheet2 which is hidden, when the button is clicked I want the next empty cell in column A to display the current date.
    Whenever the button is clicked again, go to next free line and display current date.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Add date in next free cell upon button click

    Add this line at the end of your current code.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Add date in next free cell upon button click

    If row 1 is blank it will still skip that row, but from there on down this ought to do it:

    Please Login or Register  to view this content.
    GRRRRR John! You beat me again!!! LOL
    Well done sir!
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Registered User
    Join Date
    08-08-2007
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Add date in next free cell upon button click

    Thank you both, that did the trick!

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Add date in next free cell upon button click

    You're welcome. Glad to help out and thanks for the feedback.

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Add date in next free cell upon button click

    scabertrain, thanks for the rep and the feedback, and also for marking the thread as closed

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 02-27-2017, 09:17 AM
  2. Copy and paste from Listbox to next free cell on double click
    By JohnDoh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-26-2015, 10:25 AM
  3. Button Click on Spreadsheet commanded by Button Click on Userform
    By Quilie19 in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 04-07-2015, 11:35 PM
  4. [SOLVED] click on a color button and after button click it will color entire row of cell you click
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-11-2014, 06:06 PM
  5. [SOLVED] Command button to populate todays date and time in next free row
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-12-2013, 04:04 AM
  6. Click to enter date when toggle button is depressed
    By kevinezra in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2013, 12:28 AM
  7. Replies: 0
    Last Post: 09-27-2012, 01:11 AM

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