View Single Post
 
Old 08-31-2012, 05:04 AM
Jamtart Jamtart is offline Windows 7 64bit Office 2010 64bit
Advanced Beginner
 
Join Date: Apr 2012
Posts: 53
Jamtart is on a distinguished road
Default

Hi John, I used the script that you created for me a short while ago:
Function GetAngle(ThisCos As Double) As Double
Const PI As Double = 3.141592
Dim Acos As Double
Acos = Atn(-ThisCos / Sqr(-ThisCos * ThisCos + 1)) + 2 * Atn(1)
GetAngle = Round(Acos * 180 / PI, 2)
End Function


The radians convert stuff is all greek to me sorry to say, although I was doing some reading up on just that, figuring that is where the root of the issue is.
In the mean time I did create a work around by limiting the users input to no less than 5 degrees and no greater than 80 degrees. Anything less than 5 degrees will to cause that error.
The course content that is being addressed here is representing a coil, which would never have an angle anywhere near as small as 5 degrees or as great as 80, but rather somewhere in the middle.
The work around works, but does not make the value input the most user friendly for those that may use this other than me.
I will keep looking at this to make it work 100%, thanks for the feedback...
Reply With Quote