Hi I am having a little trouble with my code.........here is what I currently have:

Code:
Private Sub initfrmCalendar()

  Dim i As Integer    'Used as a counter
  Dim iDay As Integer 'Used to set the day
   
  setStartIndex       'Set the starting index, first textbox to use
  setEndIndex         'Set the ending index, last textbox to use
  clearTextboxes      'Clear the calendar
  
  iDay = 1
  
  'Loop to fill the textboxes with days
  'Also to re-enable the disabled ones
  

  While iDay <= iEndIndex
  

    txtDay(iStartIndex).Text = iDay
    txtDay(iStartIndex).Enabled = True 'Re-enable
    txtDay(iStartIndex).BackColor = vbWhite 'Reset the color
    
    iDay = iDay + 1
    iStartIndex = iStartIndex + 1
    

  Wend
  
  
  disableUnusedBoxes
  

End Sub

Its giving an error msg on the txtDay part, saying "wrong number of arguments or invalid property assignment" the txtDay is currently a button and I what it to loop thou all the buttons, i have a control array txtDay handed coded as I am using vba,

thanx