Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Marking points read for coordinates

Peter,
It's pleasure to work with you. The previous version appeared flowless.
As I take it, the new one is corrected to avoid API calls that may have
vanished in xl2007 (I haven't it also to prove)? I'll try the change.
Regards

--
Petr Bezucha


"Peter T" wrote:

Petr, try this -

Private Sub GetCoordinates()
'Action sub deployed by clicking the ActionKey.
Dim P As Range, PN As String, XPos As Long, YPos As Long
Dim shp As Shape

GetCursorPos Pos
On Error GoTo CancelOnKey
'Target cell
Set P = Worksheets(SN).Cells(R, C)
If Not IsEmpty(P) Then
Exit Sub
End If
'Record
XPos = Pos.x
YPos = Pos.y

With ActiveWindow
XPos = (XPos - .PointsToScreenPixelsX(0)) * 100 / .Zoom
YPos = (YPos - .PointsToScreenPixelsY(0)) * 100 / .Zoom
' this might not accurately correct zoom
End With

' include "add comment" code here if required from original

' If AddPointDeck Then

XPos = 0.75 * XPos
YPos = 0.75 * YPos

XPos = XPos - TargetMarkerSize / 2
YPos = YPos - TargetMarkerSize / 2

Set shp = ActiveSheet.Shapes.AddShape(msoShapeOval, XPos, YPos, _
TargetMarkerSize, TargetMarkerSize)
With shp
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.ForeColor.SchemeColor = TargetMarkerColor
.Fill.Transparency = 0.5
.Line.Visible = msoFalse
.LockAspectRatio = msoTrue
End With
' End If
'==============================
R = R + 1
Exit Sub
CancelOnKey:
xyReadingFinish
End Sub

Regards,
Peter T



"PBezucha" wrote in message
...
Hi Peter,

Thank you for the dream cooperation. I will work on the proposed changes
over the weekend so as to create the best of us, and tell back.
It's pity that the Excel users out of economical rank have relatively
scarce
web contact. I think the miracles for the lower and middle level users
from
technical branches can be accomplished, provided somebody helps people to
get
over some obstacles that seem at the first sight to eliminate Excel in
favor
of incommensurate and expensive other applications.

Regards,
--
Petr Bezucha




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
Two points with same (X, Y) coordinates in Excel Jay Excel Discussion (Misc queries) 1 October 20th 06 01:41 AM
Two points with same (X, Y) coordinates in Excel Jay New Users to Excel 1 October 20th 06 01:41 AM
Two points with same (X, Y) coordinates in Excel Jay Charts and Charting in Excel 9 October 20th 06 01:41 AM
Scatter plot points x and y coordinates Milo Charts and Charting in Excel 0 November 28th 05 11:24 PM
A question regarding coordinates of points within a chart Wazooli Charts and Charting in Excel 3 May 15th 05 05:29 AM


All times are GMT +1. The time now is 02:59 AM.

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"