Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 May 27th, 2007, 06:16 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Running external applications from access

I am trying to run a batch file process from an application called Monarch. I have no trouble in running the below application using Shell, but when the program opens it prompts me to enter a filepath to run a .bat file, in much the same way we want to open a certain file in Excel after starting up the Excel application. I want to run the application, which I can do, but I also want vba to input the filepath into the prompt box, which looks exactly like the promt given to you by Access/Excel when open/saveas files.

My code looks like this at the moment:

Call Shell("C:\Program Files\Monarch\program\Autoscrp.exe", vbMinimizedFocus)

Please help!!



 
Old May 29th, 2007, 06:39 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not sure I understand what you are trying to do here. From the title of the post it sounds like you want to run an application from Access. Then you say you are trying to run something from an application called Monarch.

I think you are saying you want to open Monarch from Access using the code below, and you want to pass a file name to the application, which your code below is not doing. You are trying to run Autoscrp.exe using Monarch, and Monarch? (Or Access?) is promtping you for a .bat file instead?



mmcdonal
 
Old July 9th, 2007, 05:03 PM
Registered User
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to tekgod
Default

Take a look at the SENDKEYS function.

It may do the trick. It has it's drawbacks but I've used it successfully in the past when I didn't have any other way to launch an application cleanly.

Regards.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Access WEB Applications ru1 Access 0 August 20th, 2008 10:52 AM
get names of all Applications currently running gs2000 VB How-To 2 November 27th, 2006 07:20 AM
Running an external program (.exe) in VB.net webgen VS.NET 2002/2003 1 July 18th, 2005 12:57 PM
Executing External Applications(.net) pkgonline .NET Web Services 0 February 21st, 2005 09:34 AM
External Access to my site pvasudevan HTML Code Clinic 8 March 17th, 2004 06:49 AM





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