[COLOR="Navy"]Sub[/COLOR] MG12May28
[COLOR="Navy"]Dim[/COLOR] odts [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]String[/COLOR]
[COLOR="Navy"]Dim[/COLOR] Dt1 [COLOR="Navy"]As[/COLOR] Date
[COLOR="Navy"]Dim[/COLOR] Dt2 [COLOR="Navy"]As[/COLOR] Date
[COLOR="Navy"]Dim[/COLOR] Ac [COLOR="Navy"]As[/COLOR] Date
[COLOR="Navy"]Dim[/COLOR] c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Integer[/COLOR]
[COLOR="Navy"]On[/COLOR] [COLOR="Navy"]Error[/COLOR] [COLOR="Navy"]Resume[/COLOR] [COLOR="Navy"]Next[/COLOR]
odts = Application.InputBox(prompt:="Please Intert dates as:- 15/2/2011-20/3/2011 ", Title:="Insert Dates", Type:=2)
[COLOR="Navy"]If[/COLOR] odts = "" Or odts = "False" [COLOR="Navy"]Then[/COLOR] [COLOR="Navy"]Exit[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Dt1 = Split(odts, "-")(0)
Dt2 = Split(odts, "-")(1)
[COLOR="Navy"]If[/COLOR] IsDate(Dt1) And IsDate(Dt2) [COLOR="Navy"]Then[/COLOR]
[COLOR="Navy"]For[/COLOR] Ac = Dt1 To Dt2
c = c + 1
Cells(1, c) = Ac
[COLOR="Navy"]Next[/COLOR] Ac
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]If[/COLOR]
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]