R
Ripan
I have written the following function on Excel 2002 and it works withou
error on my computer. However, on a client machine, there is an error
"Compile Error: Variable not Defined" with the first line of this cod
highlighted. The client is running Office 2000 with Excel 2000.
believe this is a version compatibility issue but as I do not have
way of testing my code out on an Excel 2000 machine, is there any wa
to isolate what line in the following function is the culprit?
Any help is appreciated.
Function CreateDataArray() As Variant
'This function puts the relevant data elements and their names into
2-dimensional array, which is used
'by the DecisionTree module to score the segment
Dim data() As Variant
ReDim data(Range("Data_Fields").Rows.Count, 2) As Variant
'fill names of data fields
For i = 0 To Range("Data_Fields").Rows.Count - 1
data(i, 0) = Range("Data_Fields").Rows(i + 1, 0).value
Next i
'fill values of data fields, this may need to be changed manually i
the scoring algorithm changes
data(0, 1) = OptionButtonValue(2) 'Importance of Price Vs. Headach
Free Plan
data(1, 1) = OptionButtonValue(1) 'Importance of Price Vs. Networ
Breadth and Quality
data(2, 1) = cbxIndustry.ListIndex 'Industry
data(3, 1) = cbxBenchmark.value 'Interest in Benchmarks
data(4, 1) = cbxInnovation.value 'Interest in Innovation
data(5, 1) = cbxPlanDesign.value 'Interest in Plan Design
data(6, 1) = cbxService.value 'Interest in Proactive Service
data(7, 1) = cbxSize.ListIndex 'Number of MA Eligibles
data(8, 1) = FormMethods.ListBoxToInteger(lstProducts)
data(9, 1) = cbxReports.ListIndex
CreateDataArray = data
End Functio
error on my computer. However, on a client machine, there is an error
"Compile Error: Variable not Defined" with the first line of this cod
highlighted. The client is running Office 2000 with Excel 2000.
believe this is a version compatibility issue but as I do not have
way of testing my code out on an Excel 2000 machine, is there any wa
to isolate what line in the following function is the culprit?
Any help is appreciated.
Function CreateDataArray() As Variant
'This function puts the relevant data elements and their names into
2-dimensional array, which is used
'by the DecisionTree module to score the segment
Dim data() As Variant
ReDim data(Range("Data_Fields").Rows.Count, 2) As Variant
'fill names of data fields
For i = 0 To Range("Data_Fields").Rows.Count - 1
data(i, 0) = Range("Data_Fields").Rows(i + 1, 0).value
Next i
'fill values of data fields, this may need to be changed manually i
the scoring algorithm changes
data(0, 1) = OptionButtonValue(2) 'Importance of Price Vs. Headach
Free Plan
data(1, 1) = OptionButtonValue(1) 'Importance of Price Vs. Networ
Breadth and Quality
data(2, 1) = cbxIndustry.ListIndex 'Industry
data(3, 1) = cbxBenchmark.value 'Interest in Benchmarks
data(4, 1) = cbxInnovation.value 'Interest in Innovation
data(5, 1) = cbxPlanDesign.value 'Interest in Plan Design
data(6, 1) = cbxService.value 'Interest in Proactive Service
data(7, 1) = cbxSize.ListIndex 'Number of MA Eligibles
data(8, 1) = FormMethods.ListBoxToInteger(lstProducts)
data(9, 1) = cbxReports.ListIndex
CreateDataArray = data
End Functio