Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
relative path in shell command (excel) | Excel Programming | |||
How do I hide a shell command called from VBA in Excel | Excel Programming | |||
Shell command stopped working: is it part of Excel 95 , or Windows? | Excel Programming | |||
xp shell command using vba | Excel Programming | |||
Writing Command Shell (stdOut) to Excel Cells | Excel Programming |