View Single Post
  #7   Report Post  
Dana DeLouis
 
Posts: n/a
Default

Hi Alex. Here is a technique if interested. You typed "Application.SQRT"
....

FieldsXY = Application.SQRT((endx - startx) ^ 2 + (endy - starty)


Don't know what version you have, but in the latest versions of Excel, I
find it slightly better to use "WorksheetFunction" instead of just
"Application"
In the vba editor, go to Tools | Options | Editor tab, and make sure you
turn on "Auto List Members"
When you type "WorksheetFunction" followed by a period, you will see a list
of valid worksheet functions that are available. Older versions of Excel
required you to type "Application.WorksheetFunction" then period to get the
Auto List Members to show the functions.
HTH :)
--
Dana DeLouis
Win XP & Office 2003


"alex.k" wrote in
message ...

Thank you. Stupid me, I knew it is something simple. I actually spend
some time looking through help to find out if VB has a SQR function,
but didn't find it so I assumed it doesn't.
And maybe I should refresh my maths, as SQR is not even needed here [as
2nd answer shows:)]

Thank you both again.
Alex


--
alex.k
------------------------------------------------------------------------
alex.k's Profile:
http://www.excelforum.com/member.php...o&userid=24637
View this thread: http://www.excelforum.com/showthread...hreadid=470598