i have the following code which grabs number from a text string, and converts them to the typical excel date format
PrimaryGraphArray(UserGraphLoop, 10) = Application.WorksheetFunction.Text(Month(Left(PrimaryGraphArray(UserGraphLoop, 10), 8)) & "-" & _
Day(Left(PrimaryGraphArray(UserGraphLoop, 10), 8)) & "-" & _
Year(Left(PrimaryGraphArray(UserGraphLoop, 10), 8)), "MM/DD/YYYY")
i am then trying to subtract a different value that excel has already recognized properly as a date
when i do this, the above code still generates the first date as text, and therefore cannot subtract a different date from it.
how can i get this to be recognized properly as a date? thanks