#1
|
|||
|
|||
Get Run-time Error 11
I cant figure out how to resolve this error. If I enter a value of 1 in the Angle box I get this error. Hopefully someone can see what to do |
#2
|
|||
|
|||
Did you convert to Radians before finding the arcCos??
(sorry I'm a bit too busy to look!) |
#3
|
|||
|
|||
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... |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Run time error 1004 | yonasan | Excel Programming | 3 | 06-12-2012 11:08 PM |
Word Visual Basic error - run time error 504 | crazymorton | Word | 11 | 01-13-2012 04:32 AM |
Error:Power point can't readthe outline from time-world.ppt.No text converter is inst | aligahk06 | PowerPoint | 1 | 10-21-2011 03:48 AM |
Run-time error 438 | cksm4 | Word | 2 | 01-12-2011 03:41 PM |
Word: The document 'Filename' caused a serious error the last time ... | martincruise | Word | 0 | 02-25-2010 01:47 AM |