Well what you're trying to do will not work. I tried changing Information to a multi dementional array but you cant declare an array inside a structure soo that wont work either. The only other options is to create 2 info arrays one for mins and secs. Ofcourse this mean you'll have to restructure your entire concept.
Basically something like this, but ROO will have to be changed or deleted as its not part of Information any more.
VB Code:
Public Structure ROO_1 Public Minutes As Byte Public Seconds As Byte End Structure Public Structure INFO_TYPE Public SetInfo As Integer Public BackTime As ROO_1 End Structure Public Structure PROGRAM_TYPE Public Programs As Byte Public Number As Byte Public Time As ROO_1 Public InfoMins() As Byte Public InfoSecs() As Byte End Structure Public Structure MY_MAIN_TYPE Public Filename As String Public ProgramInformation() As PROGRAM_TYPE End Structure Public Function TestFunc() As MY_MAIN_TYPE Dim tmp As MY_MAIN_TYPE ReDim tmp.ProgramInformation(16) Dim tmp2 As PROGRAM_TYPE ReDim tmp2.InfoMins(5) ReDim tmp2.InfoSecs(5) tmp.ProgramInformation(0).Programs = 1 tmp.ProgramInformation(0).Number = 1 tmp.ProgramInformation(0).Time.Minutes = 4 tmp.ProgramInformation(2).InfoMins(1) = 23 tmp.ProgramInformation(2).InfoSecs(1) = 23 ' << ALWAYS ERRORS Return tmp





Reply With Quote