Using MSDOS

S

s4

Hi, does anyone know how to use MSDOS from Access/VBA?

I've tried using the Shell function to open DOS which works, but then my
SendKeys won't type the commands into DOS. Basically I need to automate a
process that uses DOS so the user doesn't have to fiddle about with Command.

Many Thanks
 
C

Clif McIrvin

s4 said:
Hi, does anyone know how to use MSDOS from Access/VBA?

I've tried using the Shell function to open DOS which works, but then
my
SendKeys won't type the commands into DOS. Basically I need to
automate a
process that uses DOS so the user doesn't have to fiddle about with
Command.

Many Thanks


Just a shot in the dark -- can your process be launched from a DOS batch
/ command script with the appropriate command line parameters? If so,
you could write a text file from inside Access then launch the MSDOS
script.
 
C

Clif McIrvin

s4 said:
How do I do that? I have no experience with Batch files.

Thanks

To help you here I'd need to know how you launch your MDSOS process and
how it gets the parameters you are wanting to pass to it. The first
question in my mind is: can your process read parameters off of the
command line, or is it necessasry to make it believe you are typing at
the keyboard?

With a bit more knowledge of what your external process user interface
is I may be able to assist, or perhaps point you towards others who have
more experience than I.
 
T

Tony Toews [MVP]

s4 said:
I've tried using the Shell function to open DOS which works, but then my
SendKeys won't type the commands into DOS. Basically I need to automate a
process that uses DOS so the user doesn't have to fiddle about with Command.

Why can't you call Shell multiple times then? What is it you are
trying to do?

Never ever trust SendKeys to do the right thing as suddenly another
app can get the focus and then SendKeys works against that app.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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

Top