Reputation: 77961
the following two lines
Dim curTasks As Tasks
Set curTasks = Application.Tasks
get the list of all current tasks and work like charm in vba-word
but not in vba-excel
.
is there a way to port it into vba-excel
?
Upvotes: 0
Views: 1562
Reputation: 6911
As I said in comments, the Excel object in VBA doesn't have the concept of tasks. You can do the below though in an Excel Module (although I'm still not sure why you would do it):
Dim curTasks As Tasks
Dim wrd As Word.Application
Set wrd = CreateObject("Word.Application")
Set curTasks = wrd.Tasks
NOTE: you have to add a reference to Microsoft Word Object Library to get this to work
Upvotes: 2