MLCouden

Error: Wrong number of arguments or invalid property assignment in VBA 6.0

Discussion created by MLCouden on Apr 4, 2013
Latest reply on Apr 4, 2013 by Neil
I am getting and erro of wrong number of arguments in my code. I am not understanding why. Please help!!

[/CODE]
Private Sub cboStations_Change()

           
      If cboStations.Text = "Urban" Then
          cboYear.Clear
      cboYear.AddItem >>> right here is the error>>> "2010", "2011", "2012"
     
     
      End If
     
       
       
End Sub
Private Sub cboYear_Change()

    
    
     If cboYear.Text = "2010" Then
          cboDistrict.Clear
     cboDistrict.AddItem "Abilene", "Amarillo", "Austin", "San_Antonio", "Waco", "Wichita_Falls"
     Else
     If cboYear.Text = "2011" Then
          cboDistrict.Clear
     cboDistrict.AddItem "Beaumont", "Houston"
     Else
     If cboYear.Text = "2012" Then
          cboDistrict.Clear
     cboDistrict.AddItem "Brownwood", "Bryan", "Childress", "Corpus_Christi", "El_Paso", "Lubbock", "Odessa", "Yoakum"
    
     End If
[/CODE]

Outcomes