Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Mimic keystrokes?

Hi,

Does anyone know how to mimic keystrokes and/or mouse movements using
VBA??

I'm writing a macro that uses a macro written by someone else. I do
not have access to their code, so I can't see what is happening on
their end. When their code is run, a file path box opens twice, and
each time a user has to manually press the 'cancel' button on the file
path box. I want to have my VBA code press the 'cancel' button or
press the 'escape' key twice to mimic a user clicking a mouse or
pressing 'escape' to ignore the file path box.

Any suggestions ??

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Mimic keystrokes?

You could try any of these 2 lines, but the result will be totally
unpredictable.

SendKeys "{ESC},2", True
SendKeys "{ESC},2", False

RBS

"Targus" wrote in message
ups.com...
Hi,

Does anyone know how to mimic keystrokes and/or mouse movements using
VBA??

I'm writing a macro that uses a macro written by someone else. I do
not have access to their code, so I can't see what is happening on
their end. When their code is run, a file path box opens twice, and
each time a user has to manually press the 'cancel' button on the file
path box. I want to have my VBA code press the 'cancel' button or
press the 'escape' key twice to mimic a user clicking a mouse or
pressing 'escape' to ignore the file path box.

Any suggestions ??


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
Mimic a watermark BusAdmAsst Excel Discussion (Misc queries) 2 April 11th 07 12:16 AM
mimic goalseek Monique Excel Programming 6 August 25th 05 07:11 PM
Code to mimic vlookup Mark Excel Programming 0 March 29th 05 07:21 PM
Help creating mimic input box nrage21 Excel Programming 1 January 13th 04 02:27 PM


All times are GMT +1. The time now is 09:53 PM.

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"