View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Does RangeFromPoint Method return ranges?

Sefano,

Actually, it will return a range. Run this on on empty workbook - I think
100 and 200 will be enough to get your coordinates onto the worksheet:

Set myRFP = ActiveWindow.RangeFromPoint(100, 200)
If Not myRFP Is Nothing Then
MsgBox "Hello from " & myRFP.Address
End If

In actual use, you would need to check to see if myRFP was a range or a
shape...

HTH,
Bernie
MS Excel MVP

"Stefano Gatto" wrote in message
...
The help on the RangeFromPoint Method of XL 2000 says:

Returns the Shape or Range object that is positioned at the specified pair

of screen coordinates. If there isn't a shape located at the specified
coordinates, this method returns Nothing.

Can it return the range object or not? it looks like not (even if it

states it does)