Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to control the Mouse
Is there anyway to control the mouse movements, position, and clicks? I need to control the mouse to click a certain area on my database screen. I can't get the control with the keyboard, and the mouse is the only other option. TIA, DejaVu -- DejaVu ------------------------------------------------------------------------ DejaVu's Profile: http://www.excelforum.com/member.php...o&userid=22629 View this thread: http://www.excelforum.com/showthread...hreadid=476871 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to control the Mouse
Unless you are programming some type of instructional routine that guides
the user to perform an action, you are headed in the wrong direction. If you need to execute the click event for a commandbutton in Sheet1 (Sheet1 being the code name) for example, you would rename the click event to public Private Sub CommandButton1_Click() becomes Public Sub CommandButton1_Click() then you could do Sheet1!CommandButton1_Click() to execute the click event. easier is move the meat of the code to a general module a a public sub and then you can call that from either the click event or your own routine Private Sub CommandButton1_Click() MyCode End Sub in a general module Public Sub Mycode() ' code that used to be in the click event End Sub -- Regards, Tom Ogilvy "DejaVu" wrote in message ... Is there anyway to control the mouse movements, position, and clicks? I need to control the mouse to click a certain area on my database screen. I can't get the control with the keyboard, and the mouse is the only other option. TIA, DejaVu -- DejaVu ------------------------------------------------------------------------ DejaVu's Profile: http://www.excelforum.com/member.php...o&userid=22629 View this thread: http://www.excelforum.com/showthread...hreadid=476871 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to control the Mouse
Thanks for the reply Tom. I'm still not sure how to handle this though... I don't want to click anywhere on a worksheet (or even in excel for that matter). I need to mouse click on another program. Can I use VB code to control what the mouse does, or can I use some sort of API call to (1) Open the program window and (2) make the mouse click on a specified pixel or "latitude" & "longitude" on my screen? I thought I read something that it was possible to input the coordinates and have the mouse move there and click on command... am I way off?? Thanks, DejaVu -- DejaVu ------------------------------------------------------------------------ DejaVu's Profile: http://www.excelforum.com/member.php...o&userid=22629 View this thread: http://www.excelforum.com/showthread...hreadid=476871 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to control the Mouse
I have no idea if you can do that - but if you can, I would say the approach
definitely isn't a route heavily travelled. -- Regards, Tom Ogilvy "DejaVu" wrote in message ... Thanks for the reply Tom. I'm still not sure how to handle this though... I don't want to click anywhere on a worksheet (or even in excel for that matter). I need to mouse click on another program. Can I use VB code to control what the mouse does, or can I use some sort of API call to (1) Open the program window and (2) make the mouse click on a specified pixel or "latitude" & "longitude" on my screen? I thought I read something that it was possible to input the coordinates and have the mouse move there and click on command... am I way off?? Thanks, DejaVu -- DejaVu ------------------------------------------------------------------------ DejaVu's Profile: http://www.excelforum.com/member.php...o&userid=22629 View this thread: http://www.excelforum.com/showthread...hreadid=476871 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to control the Mouse
Thanks for your help Tom. I'll figure something out ... eventually! DejaV -- DejaV ----------------------------------------------------------------------- DejaVu's Profile: http://www.excelforum.com/member.php...fo&userid=2262 View this thread: http://www.excelforum.com/showthread.php?threadid=47687 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mouse control | Excel Worksheet Functions | |||
Mouse Control | Excel Programming | |||
control-tab should move between Excel sheets without a mouse. | Excel Worksheet Functions | |||
my mouse moves diagonally when i scroll on mouse? | Excel Worksheet Functions | |||
moving mouse highlights cells without touching left mouse button | Excel Discussion (Misc queries) |