hi!
im facing a typical problem:
i developed some long program for statistical analysis in vba (from macro in excel) which runs ok in test mode on single series data; but shows "run-time error '5' invalid procedure call or argument" when run on multiple series: either
(i) runs and puts results for 1st 3 series and the error is displayed
(ii)when only 2 series are selected, 1st 2 are analysed and the error is displayed on inputting 3rd series.
the program is indeed long and not a clever one as it involves bubble sort etc. im not bothered about long running time as my other programs are doing - but this is behaving just peculiarly. please help me out of it. im attaching only those few lines which gives error:
Dim s As Integer
Dim vars_modified90 As Double
Dim vars_modified95 As Double
Dim vars_modified99 As Double
Dim z90 As Double
Dim z95 As Double
Dim z99 As Double
If s > 0 Then
z90 = CDbl(s - 1#) / (vars_modified90) ^ 0.5
z95 = CDbl(s - 1#) / (vars_modified95) ^ 0.5
z99 = CDbl(s - 1#) / (vars_modified99) ^ 0.5
ElseIf s = 0 Then
z90 = 0
z95 = 0
z99 = 0
ElseIf s < 0 Then
z90 = CDbl(s + 1#) / (vars_modified90) ^ 0.5 ' debug selects this
z95 = CDbl(s + 1#) / (vars_modified95) ^ 0.5
z99 = CDbl(s + 1#) / (vars_modified99) ^ 0.5
End If
if its a memory related problem, how can i release memory through code after one series is run?
many thanks in advance,
ashoke basistha
run-time error '5' invalid procedure call or argumentvba in excel
Page 1 of 1
3 Replies - 81388 Views - Last Post: 03 December 2009 - 01:41 PM
#1
run-time error '5' invalid procedure call or argument
Posted 23 June 2006 - 03:02 AM
Replies To: run-time error '5' invalid procedure call or argument
#2
Re: run-time error '5' invalid procedure call or argument
Posted 27 June 2006 - 12:33 AM
It sounds like you need to lookup the method called 'DoEvents' thats that usually causes that error
#3
Re: run-time error '5' invalid procedure call or argument
Posted 03 December 2009 - 05:25 AM
sontek, on 26 Jun, 2006 - 11:33 PM, said:
It sounds like you need to lookup the method called 'DoEvents' thats that usually causes that error
http://accessaidprog...edure-call.html
#4
Re: run-time error '5' invalid procedure call or argument
Posted 03 December 2009 - 01:41 PM
turn error checking off
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote







|