VBA or sendkeys - mouse move and click

J

Jane

Hello everyone

I hope you can help me with this.

I have created an access form that opens a number of windows in internet
explorer.
I need to simulate a mouse move and left click to get from one active window
to another.
The amount of move is not that important as long as it's around 2 inches or
so to the left or right, up, or down (basically out of the small Find/Search
window)

I have looked using SendKeys - something like:
{mousemove X,Y}
{mouseclick}
Of course this will not work in VBA but is the something like this available ?

I can use SendKeys Alt-Tab to show the windows panel but then you still have
to use the mouse to click the window you want

I can't use the actual mouse so it all has to be done programmatically

Thank you if you can offer any assistance

Jane
 
S

Stefan Hoffmann

hi Jane,

I have created an access form that opens a number of windows in internet
explorer.
I need to simulate a mouse move and left click to get from one active window
to another.
Why do you want to simulate it? Is 'simulation' the correct term? If the
answer is yes then you need to use Win32 API functions, e.g.

GetWindow to find the correct IE window:

http://support.microsoft.com/kb/183009

SendMessage to send any message (this includes the mouse messages) to it:

http://msdn.microsoft.com/en-us/library/ms644950(VS.85).aspx

Otherwise you should explain, what you are trying to achieve.


mfG
--> stefan <--
 

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