kato01
Full Member level 2
expecting an already dimensioned array
Hello,
I have some problems understanding the correct syntax of some of the methods :
This is the "cut & paste" from the HELP:
<<GetNumberOfVaryingParameters long
Returns the number of varying parameters.>>
1. I took all the history and turned it into a macro.
2. I would like to write in a file a summary of the project (no. of parameters, values etc, so I need to extract the values of the parameters using the appropriate VBA methods.
3. This is what I have:
Dim VNAME(10),VVALUE(10) As Long
Dim VNAME(10) As String
Dim NVAR As Integer
Dim VVALUE(10) Double
Dim i As Integer
NVAR=GetNumberOfVaryingParameters
For i=1 To 10
VNAME(i)=GetNameOfVaryingParameter(i) ‘line (*)
VVALUE(i)=GetValueOfVaryingParameter(i)
Next i
It does not work!
1. The macro does not run and @ line(*) I get the following message:
<<Expecting an already dimensioned array (VNAME(i)=GetNameOfVaryingParameter(i))>>
2. if I eliminate the (*) line AND the next one, the macro DOES run but I get NVAR=0% (I have 12 parameters)
Any ideas?
Thanks
Kato
Hello,
I have some problems understanding the correct syntax of some of the methods :
This is the "cut & paste" from the HELP:
<<GetNumberOfVaryingParameters long
Returns the number of varying parameters.>>
1. I took all the history and turned it into a macro.
2. I would like to write in a file a summary of the project (no. of parameters, values etc, so I need to extract the values of the parameters using the appropriate VBA methods.
3. This is what I have:
Dim VNAME(10),VVALUE(10) As Long
Dim VNAME(10) As String
Dim NVAR As Integer
Dim VVALUE(10) Double
Dim i As Integer
NVAR=GetNumberOfVaryingParameters
For i=1 To 10
VNAME(i)=GetNameOfVaryingParameter(i) ‘line (*)
VVALUE(i)=GetValueOfVaryingParameter(i)
Next i
It does not work!
1. The macro does not run and @ line(*) I get the following message:
<<Expecting an already dimensioned array (VNAME(i)=GetNameOfVaryingParameter(i))>>
2. if I eliminate the (*) line AND the next one, the macro DOES run but I get NVAR=0% (I have 12 parameters)
Any ideas?
Thanks
Kato