I am upgrading some old vb6 code and within that code I am working with an array that is in the structure Sample_Data_Type. The following sub was inserted at upgrade to my structure:
Structure Sample_Data_Type
Dim SD_Analyst As String
Dim SD_Comments As String
Dim SD_Date_Analyzed As String
Dim SD_Date_Collected As String
Dim SD_Date_Placed As String
Dim SD_Dilution As String
Dim SD_Job_Name As String
Dim SD_Job_Number As String
Dim SD_Machine As String
Dim SD_Matrix As String
Dim SD_Method As String
Dim SD_Sample_Number As String
Dim SD_Station_Name As String
Dim SD_Station_Number As String
Dim SD_Time_Collected As String
Dim SD_Time_Placed As String
<VBFixedArray(9)> Dim SD_Peak_Table() As Peak_Data_Type
UPGRADE_TODO: "Initialize" must be called to initialize instances of this structure. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="B4BFF9E0-8631-45CF-910E-62AB3970F27B"'
Public Sub Initialize()
'UPGRADE_WARNING: Lower bound of array SD_Peak_Table was changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="0F1C9BE1-AF9D-476E-83B1-17D43BECFF20"'
ReDim SD_Peak_Table(9)
End Sub
end structure
I went to the upgrade link and it seams to be ok. thoughts?
The only way I can use the array that is in the structure within my code is to redim before I use it in the sub. I should not have to do this as it 'should' be redim'ed within the structure. Why will it not redim within the structure for me?
or am I missing something here?
adam
Structure Sample_Data_Type
Dim SD_Analyst As String
Dim SD_Comments As String
Dim SD_Date_Analyzed As String
Dim SD_Date_Collected As String
Dim SD_Date_Placed As String
Dim SD_Dilution As String
Dim SD_Job_Name As String
Dim SD_Job_Number As String
Dim SD_Machine As String
Dim SD_Matrix As String
Dim SD_Method As String
Dim SD_Sample_Number As String
Dim SD_Station_Name As String
Dim SD_Station_Number As String
Dim SD_Time_Collected As String
Dim SD_Time_Placed As String
<VBFixedArray(9)> Dim SD_Peak_Table() As Peak_Data_Type
UPGRADE_TODO: "Initialize" must be called to initialize instances of this structure. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="B4BFF9E0-8631-45CF-910E-62AB3970F27B"'
Public Sub Initialize()
'UPGRADE_WARNING: Lower bound of array SD_Peak_Table was changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="0F1C9BE1-AF9D-476E-83B1-17D43BECFF20"'
ReDim SD_Peak_Table(9)
End Sub
end structure
I went to the upgrade link and it seams to be ok. thoughts?
The only way I can use the array that is in the structure within my code is to redim before I use it in the sub. I should not have to do this as it 'should' be redim'ed within the structure. Why will it not redim within the structure for me?
or am I missing something here?
adam