I am creating an app in excel and want to establish the status of a task based upon how the status is represented in the cell on the sheet. As an example Cell A17="Not Started" At the moment I am using a select statement
Code:
Select Case Trim(Worksheets(shtName).Cells(17,1))
Case Is = "Not Started"
.Status = 0 'olTaskComplete
Case Is = "In Progress"
.Status = 1 ' olTaskInProgress
Case Is = "Completed"
.Status = 2
Case Is = "Waiting on someone else"
.Status = 3 'olTaskWaiting
Case Is = "Deferred"
.Status = 4 'olTaskDeferred
End Select
but would prefer just to read the status from the cell as in
Code:
With olTask
.Status = Trim(Worksheets(shtName).Cells(17,1))
but that doesn't work. Is there a property that I can use to assigning the string "Completed" to a task?
Thanks for any help.
Jim