Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to run a shell command via VBA?


juanpedro;740349 Wrote:

I am new to the forum and I agree , this is a great post. I do have a
related question.

I use vba to open an SSH tunnel using plink.exe the code I use is:

Shell Environ$("COMSPEC") & " /k c:\plink -ssh -l 'username' -pw
'password' -4 -L 3306:localhost:'IP address' """

I run it using the 'on open' function for the switchboard form in
Access. i can then access mysql tables from access.

THE QUESTION (finally !!) Is there a way I can close the shell window
using VBA at some later point (when I close access)?

It would be great if it would type "EXIT" first , but I suspect that is
not essential.

Thanks!!


Rick Rothstein;503270 Wrote:

As a follow up... the following is a compilation of several posts I've
given
in the past regarding the Shell command (over in the compiled VB
newsgroups,
but applicable to the VBA world) which may prove useful.



Take a look at this code snippet in our upload/download section 'Code
Cage Downloads - The Code Cage Forums'
(http://www.thecodecage.com/forumz/lo...id=2&linkid=23)


--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?u=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=138407

http://www.thecodecage.com/forumz


--- news://freenews.netfront.net/ - complaints: ---
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
Shell Command pls123 Excel Programming 1 May 26th 09 03:51 PM
Shell Command JOHN Excel Programming 1 November 17th 04 10:39 AM
Shell command MAx Excel Programming 2 June 4th 04 04:11 PM
xp shell command using vba Sudhendra Excel Programming 2 February 16th 04 05:56 AM
SHELL command Robin Clay[_3_] Excel Programming 3 October 17th 03 02:50 PM


All times are GMT +1. The time now is 08:41 AM.

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

About Us

"It's about Microsoft Excel"