F
Finius Eetch
I have a FORM setup that allows the user to select a Start Date, Finish Date,
and Resource Name from a pick list. With that information, I generate a
Filter and custom view.
At this point, my code looks like this
Private Sub CountOfFilteredTasks()
Dim Tasks_Counted
SelectAll
On Error GoTo ErrorHandler
Tasks_Counted = ActiveSelection.Tasks.Count
Exit Sub
ErrorHandler:
MsgBox "No tasks returned by filter"
End Sub
Private Sub Check_Tasks()
Generate_Task_List
FilterApply Name:="TheFilter"
SelectAll
CountOfFilteredTasks
End sub
This works just fine as long as I get some valid tasks back. However, if I
get NO tasks I get Error 424 Object Not Found.
I have a "number of tasks found" box in my form, so all I really need it to
do is show 0, not crash out.
This is nearly the last piece for this particular macro that is holding me
up - so any help would be greatly appreciated.
and Resource Name from a pick list. With that information, I generate a
Filter and custom view.
At this point, my code looks like this
Private Sub CountOfFilteredTasks()
Dim Tasks_Counted
SelectAll
On Error GoTo ErrorHandler
Tasks_Counted = ActiveSelection.Tasks.Count
Exit Sub
ErrorHandler:
MsgBox "No tasks returned by filter"
End Sub
Private Sub Check_Tasks()
Generate_Task_List
FilterApply Name:="TheFilter"
SelectAll
CountOfFilteredTasks
End sub
This works just fine as long as I get some valid tasks back. However, if I
get NO tasks I get Error 424 Object Not Found.
I have a "number of tasks found" box in my form, so all I really need it to
do is show 0, not crash out.
This is nearly the last piece for this particular macro that is holding me
up - so any help would be greatly appreciated.