Thanks for the suggestion. I tried this, following ur advice. But i
still gives me the error message - really annoying.
Best,
Maria
Sub CommandButtonDRG_Click()
Dim i As Integer
Dim curCell As Date
Dim startDate As Date
Dim endDate As Date
With Sheets("943")
startDate = Range("c2").Value
endDate = Range("e2").Value
Columns("C:C").Select
Selection.NumberFormat = "m/d/yyyy"
Range("c2").Select
ActiveCell.FormulaR1C1 = startDate
i = 3
Do
curCell = Cells(i, 3).Select
ActiveCell.FormulaR1C1 = "=dvstradedate(R[-1]C,1)"
i = i + 1
Loop Until Cells(i - 1, 3).Value = endDate
End
End With
End Su
--
marias
-----------------------------------------------------------------------
mariasa's Profile:
http://www.excelforum.com/member.php...fo&userid=3172
View this thread:
http://www.excelforum.com/showthread.php?threadid=52307