Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Stuartf
 
Posts: n/a
Default Run a Batch file with variables


Hi

I want to be able to open an application from with-in excel which will
then open a job withing the app.

Example

Batch file (Run.bat) : "C:\Program Files\IequalsP\pressing matters
cygnus\cygnus.exe" %1

%1 = D12345 ( a job number )

so in excel something like

=HYPERLINK("Run.bat D12345","Open Job")


--
Stuartf
------------------------------------------------------------------------
Stuartf's Profile: http://www.excelforum.com/member.php...o&userid=34535
View this thread: http://www.excelforum.com/showthread...hreadid=545091

  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Run a Batch file with variables

This old code, run from a regular module in Excel, will open AutoCAD and
then the file called acadtest.dwg........perhaps it will help point the way
to what you want to do....

Sub StartAutocad()
VBA.Shell "c:\program files\autocad lt 2000i\aclt.exe c:\acadtest1.dwg",
vbMaximizedFocus
Dim oAutoCad As Object
Set oAutoCad = GetObject("c:\acadtest1.dwg")
oAutoCad.sendcommand "filedia" & Chr(32) & "0" & Chr(32)
oAutoCad.sendcommand "script" & vbCr & "c:\Program
Files\Scriptsheets\Script.scr" & vbCr & vbCr
oAutoCad.sendcommand "filedia" & Chr(32) & "1" & Chr(32)
End Sub


Vaya con Dios,
Chuck, CABGx3





"Stuartf" wrote:


Hi

I want to be able to open an application from with-in excel which will
then open a job withing the app.

Example

Batch file (Run.bat) : "C:\Program Files\IequalsP\pressing matters
cygnus\cygnus.exe" %1

%1 = D12345 ( a job number )

so in excel something like

=HYPERLINK("Run.bat D12345","Open Job")


--
Stuartf
------------------------------------------------------------------------
Stuartf's Profile: http://www.excelforum.com/member.php...o&userid=34535
View this thread: http://www.excelforum.com/showthread...hreadid=545091


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
disc full, saved to temp. file charlies Excel Discussion (Misc queries) 7 May 18th 06 08:40 PM
Pasword protected Excel file encrypted, how do I read this file? jonesteam Excel Discussion (Misc queries) 2 December 12th 05 06:32 PM
Weird File Open/Save As Behavior [email protected] Excel Discussion (Misc queries) 0 December 9th 05 02:26 AM
Links picking up values from an older version of linked file Cate Links and Linking in Excel 4 October 20th 05 01:53 PM
cannot open excel file, please help!!! sunlite Excel Discussion (Misc queries) 0 September 5th 05 05:29 PM


All times are GMT +1. The time now is 01:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"