• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to insert today's date by clicking on QAT

I am trying to click on QAT to insert today's date in a cell in any xl worksheet
by assigning a macro to it but all get is =TODAY() when i should be getting
the date instead.
Can anybody please enlighten. ThankS.
Is there a xl formula that can do this or is VBA the only way out.
ThankS again.
Btw......i'm using Excel 2013 on my Dell Studio laptop.
 
If you want the date use
ActiveCell.FormulaR1C1 = Date

If you want a formula to calculate the date every day
ActiveCell.FormulaR1C1 = "=TODAY()"

What code are you using?
 
Very many thanks, Hui.
Here's what i finally got. Ur valuable suggestions r most welcome.

Sub todays_date
Selection.Value = Date
Selection.Columns.Autofit
End Sub

Or simply......

Sub todays_date
Selection.Columns = Date
End Sub

In both cases xl will display 10/21/2014 in the selected cell by clicking on QAT.
 
Back
Top