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:
  1. Public Structure ROO_1
  2.         Public Minutes As Byte
  3.         Public Seconds As Byte
  4.     End Structure
  5.  
  6.     Public Structure INFO_TYPE
  7.         Public SetInfo As Integer
  8.         Public BackTime As ROO_1
  9.     End Structure
  10.  
  11.     Public Structure PROGRAM_TYPE
  12.         Public Programs As Byte
  13.         Public Number As Byte
  14.         Public Time As ROO_1
  15.         Public InfoMins() As Byte
  16.         Public InfoSecs() As Byte
  17.     End Structure
  18.  
  19.     Public Structure MY_MAIN_TYPE
  20.         Public Filename As String
  21.         Public ProgramInformation() As PROGRAM_TYPE
  22.     End Structure
  23.  
  24.     Public Function TestFunc() As MY_MAIN_TYPE
  25.  
  26.         Dim tmp As MY_MAIN_TYPE
  27.         ReDim tmp.ProgramInformation(16)
  28.         Dim tmp2 As PROGRAM_TYPE
  29.         ReDim tmp2.InfoMins(5)
  30.         ReDim tmp2.InfoSecs(5)
  31.  
  32.  
  33.  
  34.         tmp.ProgramInformation(0).Programs = 1
  35.         tmp.ProgramInformation(0).Number = 1
  36.         tmp.ProgramInformation(0).Time.Minutes = 4
  37.         tmp.ProgramInformation(2).InfoMins(1) = 23
  38.         tmp.ProgramInformation(2).InfoSecs(1) = 23 ' << ALWAYS ERRORS
  39.  
  40.         Return tmp