Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 14th, 2006, 04:36 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default Executable - vb.net

Dear Sir or Madam,

I have an excel macro which I want to run at a certain time, but I my company has us close our machines down at the end of everyday. I would like to place an excutable on a server, and have it run at 7am, every day, so that when I come in at 8pm I can just print off the results of my macro.

does anyone have an example of this.

K
 
Old July 17th, 2006, 01:36 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Have your company IT personnel set up a scheduled task for you. The server has the necessary tools to do this.
 
Old July 18th, 2006, 03:59 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by BrianWren
 Have your company IT personnel set up a scheduled task for you. The server has the necessary tools to do this.
Will this open my excel file and fire off my marcos'?
 
Old July 20th, 2006, 02:28 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The way my company is stuctured it is impossible to ask IT to do this. I know it is possible, can you help me with the code:

To fire at 7:00 am,
1)Open Test.xls -on my- "Y:\Cost\Wally\Past Daily Runs\Test.xls
2)Execute macro 'Sub Test'
3)Shut down.

Thank you
 
Old July 20th, 2006, 05:07 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

To set up sheduled events, you need to have rights to the machine that will be running the scheduled event—and I don’t mean just access to resources on the machine such as files and folders.

If your IT department is not willing to set this up for you, I’m sure they won’t be willing to give you admin rights to the machine, nor the software to administer that server from your workstation location...

This is not a code issue; it is a configuration issue.
If you double-click on Y:\Cost\Wally\Past Daily Runs\Test.xls when you are looking at it from your workstation using Windows explorer, or if you create a shortcut to it, or if you enter "Y:\Cost\Wally\Past Daily Runs\Test.xls" in the Start>[u]R</u>un dialog—in other words, if you use any of the methods Windows has to execute a file with its parent application—the application starts on your machine, in your machine’s memory, and uses the file that resides on a server as the data source.

When your machine is turned off/logged out there is no way to run an application in its memory, using its processor—it is turned off.

That's why the application (Excel in this case) needs to be initiated from the server—so it will run on the server.

Scheduler invokes a program on the machine that has that event scheduled on it. Somebody is going to have to get that server (or some networked machine that is on overnight) to have this task set up in its scheduled events. You, the IT department, somebody.
 
Old July 20th, 2006, 07:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I agree with Brian.
if what are doing is a project for your company talk with your manager and have he/she talking with the IT department.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert .NET assembly to Executable asifdahir C# 1 January 24th, 2007 09:44 AM
Calling an executable file from ASP.NET kwilliams ASP.NET 2.0 Basics 0 June 8th, 2006 11:43 AM
VB executable not working on all computers JasperGIS VB Databases Basics 0 October 28th, 2005 10:54 AM
VB.NET Executable Fully Trusted bmains VB.NET 7 January 10th, 2005 09:30 AM
Create Executable/Distrubution VB.net Program KennethMungwira VB.NET 2 December 12th, 2003 04:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.