LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default How do I make the mouse cursor get a value..?

Fellow programmers thank you for your time. I need some assistance...
I am trying to figure out how to get the mouse cursor select from text
from a specific x z cord and paste the value in a text box on my
userform. Here is some code I tried...

SetCursorPos 255, 413

Do Until UserForm1.TextBox1.Value = 521
DoEvents
Application.Run "mouscoords"
mouse_event MOUSEEVENTF_LEFTDOWN, 0&, 0&, 0&, 0&
SendKeys "^C", True
UserForm1.TextBox3.SetFocus
SendKeys "^V", True
mouse_event MOUSEEVENTF_LEFTUP, 0&, 0&, 0&, 0&
UserForm1.TextBox1.Value = UserForm1.TextBox1.Value + 1
SetCursorPos UserForm1.TextBox1.Value, 413
DoEvents
Loop

It doesn't seem to want to work... I'd imagine that this isn't the
best way of doing this but but I'm curious if anyone has gotten
something simlar to work. I was also wondering if it was possible for
Excel VBA to read the value of a mouse cord x z value... Any ideas?
There seems to be alot of brilliant people on this message board so I
look forward to see what the end result is.

Thank you ever so much!
 
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
mouse cursor for a shape excel_stuck via OfficeKB.com Excel Programming 0 July 17th 06 12:14 PM
mouse cursor to a button using api x taol Excel Programming 1 April 2nd 06 08:45 AM
position mouse cursor in msg box swatsp0p[_2_] Excel Programming 2 September 24th 04 07:12 AM
Getting text under mouse cursor Kallepalle Excel Programming 2 May 23rd 04 05:30 PM
cursor or mouse move matt dunbar Excel Programming 1 January 16th 04 02:58 PM


All times are GMT +1. The time now is 06:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"