Q_21884491.html - Still a problem
Posted on 2006-06-15
In the link above is the code for the postdrag event of the calendar to help me drag and drop a calendar entry. Now with that i had a type mistmatch error. The error was fixed by implementing the following code inside the script in the link above.
Forall x In tmpList
Redim Preserve oldList(i)
oldList(i) = Format$(x, "Short Date")
i = i + 1
However, with this code now, the list that I am placing in the newList is a string list.
Now I want to try to convert it to date list(array of dates) instead of having newlist populated in my date field on the document as text list because I'll have a lot of other problems with it later.
I tried using the same loop above on the newlist, before assigning that to doc.testdates
Forall elements In tmpList1
Redim Preserve newlist(j)
newlist(j) = Cdat(j)
j = j + 1
I get out of subscript error.
I try the following:
newlist = cDat(newList)
I know though that this doesn't work because I know to change the value from text to date on each elements of the oldlist array.
I also tried to use Evaluate with @texttotime on newList and still had problems with it.
What's the simplest, most efficient way to resolve this problem and at the same time convert the newList array to short dates(without time) before assigning the value back to the field on the document?
Thank you all in advance.