Close a window opened by a Shell command in VB

M

mpfohl

In my VB code, I open a folder with the shell command, but i want to
be able to close it.

here is what i have:


Set oShell = WScript.CreateObject ("WSCript.shell")

oShell.run ("MyTextFile.txt")

[..other code..]

oShell.Close '<-- this doesn't work.


How do i close the 'myTextFile' that I opened earlier?

I also could do the above code as a batch file, so if the language for
that is easier, i'd do it in that. just let me know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top