Macro Recorder

Jaye7

Well-known Member
Joined
Jul 7, 2010
Messages
1,060
Just wondering if you can use excel like a macro recorder program IN THE FOLLOWING WAY.

With a macro recorder program the program clicks on specific points of i.e. latitude longitude, so if you had a textbox or userform etc... you could have a script to select a specific point anywhere on your page.

If so can someone please advise how to achieve it as at the moment my macro will only click on a cell address/ location not a specific point.

Thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Not sure if this is what you want but it will return the mouse position.

Code:
Dim MyPointAPI As POINTAPI
Private Type POINTAPI
  X As Long
  Y As Long
End Type
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Public Sub Timer1_Timer()
  l = GetCursorPos(MyPointAPI)
  MsgBox CStr(MyPointAPI.X) & ", " & CStr(MyPointAPI.Y)
End Sub

Cheers

Dan
 
Upvote 0
Thanks for your reply blade hunter, sorry for the late response, been busy.

Just what I am after, I have added a wait function so that I have time to go to the point I am after.

Can you please provide a with script that utilizes the points as I'm not the best with script writing i.e. something like

with CStr(MyPointAPI.X) & ", " & CStr(MyPointAPI.Y).address
leftmouseclick
end with

Thanks.
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top