473,385 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

DLL to create task in scheduler - cannot create component

Pat
A97, WinXP
Hello,
I am looking for a way to create a task (in the windows task scheduler) from
an Access MDB using VBA. I found this great DLL:

http://www.mtogden.com/~tom/files/Sc...ngAgentVB6.zip

However, when I test it with a basic example:

Dim jb as CJob
For Each jb In TaskScheduler.Jobs '*****
Debug.Print jb.Name
Next jb

Access returns Error 429: Activex Component Cannot Create Object on the line
marked with '*****. I've got a reference to the dll, and ActiveX 2.1
Library (even tried up to 2.7).

Can anyone shed some light on what I'm missing?
Many thanks - as always!
Pat
Nov 12 '05 #1
3 5165
TC
Maybe show us the code that instantiates the object?

TC
"Pat" <pa*@noemail.ihatespam.bum> wrote in message
news:uP*****************@twister.austin.rr.com...
A97, WinXP
Hello,
I am looking for a way to create a task (in the windows task scheduler) from an Access MDB using VBA. I found this great DLL:

http://www.mtogden.com/~tom/files/Sc...ngAgentVB6.zip

However, when I test it with a basic example:

Dim jb as CJob
For Each jb In TaskScheduler.Jobs '*****
Debug.Print jb.Name
Next jb

Access returns Error 429: Activex Component Cannot Create Object on the line marked with '*****. I've got a reference to the dll, and ActiveX 2.1
Library (even tried up to 2.7).

Can anyone shed some light on what I'm missing?
Many thanks - as always!
Pat

Nov 12 '05 #2
Pat
TC,
Thanks for the reply. The supporting documentation had the following info:

The TaskScheduler Object

The TaskScheduler object is a global object. It is created
automatically the first time you reference it in your code.

Just tried the same code below in A2K with no probs.
Pat

"TC" <a@b.c.d> wrote in message news:1068177369.556431@teuthos...
Maybe show us the code that instantiates the object?

TC
"Pat" <pa*@noemail.ihatespam.bum> wrote in message
news:uP*****************@twister.austin.rr.com...
A97, WinXP
Hello,
I am looking for a way to create a task (in the windows task scheduler)

from
an Access MDB using VBA. I found this great DLL:

http://www.mtogden.com/~tom/files/Sc...ngAgentVB6.zip

However, when I test it with a basic example:

Dim jb as CJob
For Each jb In TaskScheduler.Jobs '*****
Debug.Print jb.Name
Next jb

Access returns Error 429: Activex Component Cannot Create Object on the

line
marked with '*****. I've got a reference to the dll, and ActiveX 2.1
Library (even tried up to 2.7).

Can anyone shed some light on what I'm missing?
Many thanks - as always!
Pat


Nov 12 '05 #3
TC
I imagine you need to create the TaskScheduler object using the New keyword
or the CreateObject statement. Check the documentation that came with the
DLL.

HTH,
TC

Pat <pa*@noemail.ihatespam.bum> wrote in message
news:uP*****************@twister.austin.rr.com...
A97, WinXP
Hello,
I am looking for a way to create a task (in the windows task scheduler) from an Access MDB using VBA. I found this great DLL:

http://www.mtogden.com/~tom/files/Sc...ngAgentVB6.zip

However, when I test it with a basic example:

Dim jb as CJob
For Each jb In TaskScheduler.Jobs '*****
Debug.Print jb.Name
Next jb

Access returns Error 429: Activex Component Cannot Create Object on the line marked with '*****. I've got a reference to the dll, and ActiveX 2.1
Library (even tried up to 2.7).

Can anyone shed some light on what I'm missing?
Many thanks - as always!
Pat

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Oliver Gräser | last post by:
Hej, I want to run batchfiles via the Shell, but accessible in the Browser via IIS. Actually, I'd like the server to start a command line ntbackup if a users selects to do so on an ASP in his...
2
by: database_guy | last post by:
I am getting the following error when trying to run or schedule a task. Please see below. There are more error explanations and I did not put all of them because I believe it to be one of the 1st...
6
by: John Bowman | last post by:
Hi, I have a C# app that needs to launch the "Add Scheduled Tasks" wizard found in the control panel "Scheduled Tasks" applet. I realize that this "applet" really just opens the tasks folder,...
7
by: Shane Story | last post by:
Have an app and would like to allow easy addition of MYAPP.EXE /F /P (for example) my prog with command line args, as a job to be run. Would like to make it easier on the user to run the app. ...
2
by: microsoft.private.windows.netserver.setup | last post by:
Hello, I was wondering if someone can help. I have built a VB.NET application that is just a simple .exe which calls Excel and inputs some data. But when run in a Task Scheduler setting, the...
4
by: mabond | last post by:
Does anyone know some code that will allow me to enable and/or disable a task which already exists in the task scheduer. I have a task which runs at 15 min intervals and from time to time I want to...
3
by: mayur_hirpara | last post by:
Hi, I am writing a VB.NET application. It is a Windows application at the moment. The application contains a button. the click event of button perform a long running task. It needs to be started...
4
by: Sid Price | last post by:
Is there a .NET (2003) class available somewhere that might provide a comprehensive task scheduler with a better granularity than the one minute of the built-in scheduler on XP? Even down to 15...
2
by: Ryan Liu | last post by:
When I look at MSDN, I found there is a thing called Task Scheduler 1.0/2.0. But it says: Task Scheduler 1.0: Interfaces are provided for C++ development. Are there class lib for C#...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.