Executing a command line using code 
Author Message
 Executing a command line using code

Greetings

I know of 3 ways to execute a Command Line, for example.

"C:\Microsoft
Office\Office\Msaccess.exe" "D:\MyDatabase.mdb" /compact

1.) Go to Start Menu > Run. Enter the Command Line and
press ENTER.

2.) Create a Windows shortcut. Enter the Command Line in
the Target box. Then launch the shortcut.

3.) Use the FollowHyperlink method to launch a shortcut
containing a Command Line.

What i want to do is to be able to launch a Command Line
from Visual Basic code. Example:

Sub LaunchCommandLine()

Statement that launches a Commandline

End Sub

It would be very useful if I could execute any kind of
Commandline from code. Is this possible?

Any ideas would be very much appreciated

DZ



Thu, 21 Jul 2005 10:05:22 GMT  
 Executing a command line using code
Yes, you want the Shell function. Quite a useful function!

See Shell in Access VBA Help.

HTH,

Max
www.siliconpublishing.com


Quote:
> Greetings

> I know of 3 ways to execute a Command Line, for example.

> "C:\Microsoft
> Office\Office\Msaccess.exe" "D:\MyDatabase.mdb" /compact

> 1.) Go to Start Menu > Run. Enter the Command Line and
> press ENTER.

> 2.) Create a Windows shortcut. Enter the Command Line in
> the Target box. Then launch the shortcut.

> 3.) Use the FollowHyperlink method to launch a shortcut
> containing a Command Line.

> What i want to do is to be able to launch a Command Line
> from Visual Basic code. Example:

> Sub LaunchCommandLine()

> Statement that launches a Commandline

> End Sub

> It would be very useful if I could execute any kind of
> Commandline from code. Is this possible?

> Any ideas would be very much appreciated

> DZ



Thu, 21 Jul 2005 10:31:42 GMT  
 Executing a command line using code
Thank you Max

That's exactly what I wanted.

Angelo



Thu, 21 Jul 2005 11:37:37 GMT  
 Executing a command line using code
Thank you Max

That's exactly what I wanted.

Angelo



Thu, 21 Jul 2005 11:37:36 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. executing vb programs using command line parameters

2. How to execute a command line command from a *.HTA

3. Executing command to command line from VB App

4. How to execute script code line by line?

5. Debugging code wend using Command line options

6. Using the ADO Command Object to send an Execute command

7. Win32 Code to Hide When You Run Command-Line Commands

8. Command-Line arguments using Command()

9. Executing command line function from VBA (Excel)

10. VBA script - execute from command line

11. AutoNew fails to execute from command line

12. Executing command-line EXE and retrieving output

 

 
Powered by phpBB® Forum Software