SendKeys to MS-DOS App using VBA/Excel 
Author Message
 SendKeys to MS-DOS App using VBA/Excel

Hi Greg,

> Microsoft documentation says you can't send keystrokes directly
> from VB to an MS-DOS app.  Microsoft Knowledge Base article
> Q77394 offers the following workaround using the clipboard:

Oh, man, don't use the clipboard. Yuck!

8< ---Snip---

> I need to send keystrokes to an MS-DOS app from VBA in Excel.

8< ---Snip---

Okay, now I haven't tried this myself, but I see no reason why it wouldn't
work. I had this same problem with the SendKeys command, so I wrote a
version of SendKeys (called PushKeys) which does work with DOS apps. It
also is more robust, has more sendable function keys (eg. numeric keypad
keys), and has more features. You can get the source code module, test app
and help file (its all free) from:
http://www.*-*-*.com/ ~clatta
in the "download free stuff" section.

This is a module written in VB4 using Win32 API calls, so if you're using
16bit, sorry, but it won't work.

I hope this helps you. Please let me know if it does work in VBA.

Remove last "x" to send non-spam email

Thu, 11 Nov 1999 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. SendKeys to MS-DOS App

2. Using Shell, AppActivate and Sendkeys to control DOS app from VB

3. Compatibility Problem Using MS Excel 97 VBA on Excel 2000/XP - Causes crashes

4. SENDKEYS for MS-DOS Window (16-bit)?

5. SendKeys to MS-DOS Window

6. Write data from excel to MS-Access using VBA

7. Problems updating MS Graph charts in Powerpoint using Excel VBA

8. how to connect to ms access through excel, using vba

9. using vba in MS Excel

10. SendKeys to DOS Apps

11. SendKeys to DOS app

12. SendKeys to DOS app


Powered by phpBB® Forum Software