• 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.

Macro change

I have the following macro. At the row that I've marked "**" I want to put today's date in that cell by using a "Ctrl ;" or some other suggestion. What I'm getting is the date of the day the macro was created.


So...I need to know the correct syntax so that I can modify the macro.


Sub AddMMRowWithDate()

'

' AddMMRowWithDate Macro

'


'

Selection.EntireRow.Insert

** ActiveCell.FormulaR1C1 = "5/24/2012"

Range("D6:E6").Select

Selection.AutoFill Destination:=Range("D5:E6"), Type:=xlFillDefault

Range("D5:E6").Select

Range("H6").Select

Selection.AutoFill Destination:=Range("H5:H6"), Type:=xlFillDefault

Range("H5:H6").Select

Range("B5").Select

End Sub
 
ActiveCell.FormulaR1C1 = Now

'Includes Date and Time


or


ActiveCell.FormulaR1C1 = Int(Now)

'Includes Date only
 
Back
Top