Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 14th, 2006, 04:36 PM
Authorized User
 
Join Date: Jun 2003
Location: Birmingham, N/a, USA.
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
Reply With Quote
  #2 (permalink)  
Old July 17th, 2006, 01:36 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
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.
Reply With Quote
  #3 (permalink)  
Old July 18th, 2006, 03:59 PM
Authorized User
 
Join Date: Jun 2003
Location: Birmingham, N/a, USA.
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'?
Reply With Quote
  #4 (permalink)  
Old July 20th, 2006, 02:28 PM
Authorized User
 
Join Date: Jun 2003
Location: Birmingham, N/a, USA.
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
Reply With Quote
  #5 (permalink)  
Old July 20th, 2006, 05:07 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
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.
Reply With Quote
  #6 (permalink)  
Old July 20th, 2006, 07:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:33 AM.


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