Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help: Excel and Shell Command

What I'm trying to do is creat a speadsheet that is a checklist for
Standard Operating Procedures. I have check boxes and when a box gets
checked, I call the shell function (vbscript) to launch other apps
(cmd, notepad, etc)

What i'm having touble with is launching active directory (dsa.msc)

I've tried:

Shell ("dsa.msc")
Shell ("cmd dsa.msc")
Shell ("\\localhost\cmd dsa.msc")
Shell ("c:\windows\system32\dsa.msc")

Any ideas on what I am doing wrong and how I can get this to work.

Thanks a lot

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default Excel and Shell Command

I don't use AD so this is just a guess based on some notes I've got. Try

Shell ("mmc.exe dsa.msc")

Steve


wrote in message
oups.com...
What I'm trying to do is creat a speadsheet that is a checklist for
Standard Operating Procedures. I have check boxes and when a box gets
checked, I call the shell function (vbscript) to launch other apps
(cmd, notepad, etc)

What i'm having touble with is launching active directory (dsa.msc)

I've tried:

Shell ("dsa.msc")
Shell ("cmd dsa.msc")
Shell ("\\localhost\cmd dsa.msc")
Shell ("c:\windows\system32\dsa.msc")

Any ideas on what I am doing wrong and how I can get this to work.

Thanks a lot



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel and Shell Command

Thanks for the reply Steve...I've tried this already too, it doesn't
work either. Hmmm. Maybe there is a security policy built into
Windows that does not allow VBscrips to access AD.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default Excel and Shell Command

Josh,

I suspect you've been here but just in case, check out:
http://www.microsoft.com/technet/scr...r/default.mspx

Take the "Scripting Guys" link on the right side of the page and then review
the AD scripts. I simply don't have a way to test AD scripts but I think
there may be solutions other than using Shell that will get you much closer
to what you want.

Steve



wrote in message
oups.com...
Thanks for the reply Steve...I've tried this already too, it doesn't
work either. Hmmm. Maybe there is a security policy built into
Windows that does not allow VBscrips to access AD.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help: Excel and Shell Command


Have you tried

Shell "C:\WINDOWS\system32\mmc.exe C:\DirectoryWithMyFileInIt\dsa.msc

--
Ivan F Moal

-----------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...nfo&userid=195
View this thread: http://www.excelforum.com/showthread.php?threadid=53515



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Help: Excel and Shell Command

This tiny macro works for me:

Sub Macro1()
x = Shell("cmd.exe /c C:\WINDOWS\system32\eventvwr.msc", 1)
End Sub

try adapting it.
--
Gary's Student


" wrote:

What I'm trying to do is creat a speadsheet that is a checklist for
Standard Operating Procedures. I have check boxes and when a box gets
checked, I call the shell function (vbscript) to launch other apps
(cmd, notepad, etc)

What i'm having touble with is launching active directory (dsa.msc)

I've tried:

Shell ("dsa.msc")
Shell ("cmd dsa.msc")
Shell ("\\localhost\cmd dsa.msc")
Shell ("c:\windows\system32\dsa.msc")

Any ideas on what I am doing wrong and how I can get this to work.

Thanks a lot


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help: Excel and Shell Command

Thanks a lot guys for the replies. Gary's Student, I tried your
solution first and it works like a champ.

Thanks again,

Josh

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Help: Excel and Shell Command

You are very welcome. The neat thing about using cmd.exe in the shell
command is that cmd has all the file associations at its disposal.

That means you don't have to wory about picking the right app twice.
--
Gary's Student


" wrote:

Thanks a lot guys for the replies. Gary's Student, I tried your
solution first and it works like a champ.

Thanks again,

Josh


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
relative path in shell command (excel) SpeeD Excel Programming 1 November 16th 05 05:29 PM
How do I hide a shell command called from VBA in Excel Robert Lyriotakis Excel Programming 2 December 8th 04 02:25 PM
Shell command stopped working: is it part of Excel 95 , or Windows? Charles Jordan Excel Programming 9 May 4th 04 06:39 AM
xp shell command using vba Sudhendra Excel Programming 2 February 16th 04 05:56 AM
Writing Command Shell (stdOut) to Excel Cells Ryan Waltz Excel Programming 0 January 28th 04 10:52 PM


All times are GMT +1. The time now is 08:53 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"