Hi,
I have used the below code to get the current month date, but it is filling the date until the last cell i.e. 1 may 2012 to "last row date" something like 3-jan- 4015. Kindly help me to get the current month dates alone in the spread sheet.
![]()
Sub CurrentMonthdate() 'MsgBox Month(Now) 'MsgBox Application.WorksheetFunction.EoMonth(Now(), 0) Range("A2").Select ActiveCell = Application.WorksheetFunction.EOMonth(Now(), -1) + 1 ActiveCell.NumberFormat = "mm/dd/yyyy" While (ActiveCell <> Application.WorksheetFunction.EOMonth(Now(), 0)) ActiveCell.Offset(1, 0).Select ActiveCell = ActiveCell.Offset(-1, 0) + 1 ActiveCell.NumberFormat = "mm/dd/yyyy" Wend End Sub
Bookmarks