Created a tlb from an idl. The idl has an import statement for the msstask.idl that contains the interface and method definitions for the windows task scheduler.

my idl:

import "unknwn.idl";
import "mstask.idl";
import "oaidl.idl";

[uuid(385B2C1C-04E5-4477-A8A4-5F98307618E9), version(1.1), helpstring("Task Trigger Test2")]

library RbTaskTriggerLib {
importlib("stdole32.tlb");
[uuid(6B05647F-CD6E-41fe-97A8-5E8F4B5E4E78)]

coclass RBTaskTriggerTest
{
[default] interface ITaskScheduler;
interface ITask;
interface ITaskTrigger;
interface IPersistFile;
interface IScheduledWorkItem;
};
};

VB project has a reference to the tlb. Object Browser shows the interfaces and methods defined in the mstask.idl as it should. The coclass is declared as follows:

'Dim ptasksch As New RBTaskTriggerTest'

However, I receive an error with the following line:

'ptasksch.SetTargetComputer (computer)'

The error is 'Runtime error 429 - ActiveX component cannot create object'.

Can someone enlighten me on the source of this problem?