Hello, I have, with the help of this forum modifed some code that now returns a list of dates in sequence compiled from a start date and repeat count entered by the user.
My problem is this - the output provided the dates as one record, is there any way that these values can be stripped and placed as individual records?
Thanks.
Function x(hStart As Date, repeat As Integer) As String
Dim dteHold As Date
Dim strHold As String
Dim n As Integer
dteHold = hStart
strHold = ""
For n = 1 To repeat
strHold = strHold & dteHold & ", "
dteHold = DateAdd("d", 1, dteHold)
Next n
x = Left(Trim(strHold), Len(Trim(strHold)))
End Function
My problem is this - the output provided the dates as one record, is there any way that these values can be stripped and placed as individual records?
Thanks.
Function x(hStart As Date, repeat As Integer) As String
Dim dteHold As Date
Dim strHold As String
Dim n As Integer
dteHold = hStart
strHold = ""
For n = 1 To repeat
strHold = strHold & dteHold & ", "
dteHold = DateAdd("d", 1, dteHold)
Next n
x = Left(Trim(strHold), Len(Trim(strHold)))
End Function