View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Pierre[_19_] Pierre[_19_] is offline
external usenet poster
 
Posts: 18
Default Place wingding on specific coordinates - possible?

On Aug 17, 2:15*am, Pierre wrote:
Hi all,
I measure distances, areas, etc. on a drawing inserted on a Sheet
using the coordinates when the mouse was clikced. However, If I click
on coordinate, say (450,370) I would like a wingding to be placed on
that coordinate as a reminder that I've already clicked on that spot
on the drawing. Is it possible? I don't now here to start probramming
this. Thanks in advance


Here is my feeble attempt to place wingding on "Picture1": Obviously
it does not work since I do not have the sytax to place the wingding
at certain coordinates (pPosition.X and pPosition.Y) instead of a
certain cell on the Sheet.

Directives would be greatly appreciated


Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long

Type POINTAPI
X As Long
Y As Long
End Type

Sub TEST1()
Application.ScreenUpdating = False
Dim pPosition As POINTAPI

Dim lReturn As Long
Dim ROW As Integer

Application.Cursor = xlNorthwestArrow

Range("T5").Select
lReturn = GetCursorPos(pPosition)


'PLACE THE VALUE OF X IN CELL T5
ActiveCell.Value = pPosition.X

'PLACE THE VALUE OF Y IN CELL U5
ActiveCell.Offset(0, 1).Value = pPosition.Y

'PLACE THE VALUES OF X AND Y IN COLUMNS AD AND AE FOR
'FURTHER MANIPULATION, I.E. DISTANCE BETWEEN CLICKS, ETC

ActiveCell.Offset(0, 10).Select

Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop

ROW = 4

ActiveCell.Value = pPosition.X
ActiveCell.Offset(0, 1).Select
Selection.Value = pPosition.Y

Application.ScreenUpdating = True


''PLACE WINGDING ON THE X AND Y POSITION

Debug.Print Application.Rept(Chr(116), 1)


End Sub