![]() |
INVALID PROCEDURE CALL OR ARGUMENT
Dim V, E ,m,r as double
'error line V=(2*(E - m/r))^.5 'all the variables have values to them When I run it I get: Run-time error '5': Invalid procedure call or argument. What may be the error? |
INVALID PROCEDURE CALL OR ARGUMENT
On Sat, 14 Nov 2009 14:57:01 -0800, Philosophaie
wrote: Dim V, E ,m,r as double 'error line V=(2*(E - m/r))^.5 'all the variables have values to them When I run it I get: Run-time error '5': Invalid procedure call or argument. What may be the error? I cannot reproduce your error given the information you have provided. Your error is likely from something you have not told us about. --ron |
INVALID PROCEDURE CALL OR ARGUMENT
Sub philo()
Dim e As Double, m As Double, r As Double, v As Double e = 100 m = 10 r = 2 v = (2 * (e - m / r)) ^ 0.5 MsgBox v End Sub Just be sure thaqt yoiu are taking the square root of a POSITIVE number. -- Gary''s Student - gsnu200908 "Philosophaie" wrote: Dim V, E ,m,r as double 'error line V=(2*(E - m/r))^.5 'all the variables have values to them When I run it I get: Run-time error '5': Invalid procedure call or argument. What may be the error? |
INVALID PROCEDURE CALL OR ARGUMENT
Something like this will produce the same error as you had.
V=(-2)^.5 This is what Gary's Student has already mentioned. Keiji Philosophaie wrote: Dim V, E ,m,r as double 'error line V=(2*(E - m/r))^.5 'all the variables have values to them When I run it I get: Run-time error '5': Invalid procedure call or argument. What may be the error? |
All times are GMT +1. The time now is 11:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com