title: I am trying to make a dependent combobox for month and year then i want from the sorted data i want to sum for specific 3 column
body: <p>'I am trying to make a dependent combobox for month and year then i want to sum for specific 3 column. my code works for only one combobox. Here is my code below. I also face another problem when i assign a button  to show the data in the textboxes. the data automatically comes when i select from the combobox.'</p>
  <pre><code>Sub comboboxmonth_Change()
  With Sheets(&quot;Database&quot;)
      .AutoFilterMode = False
      lRow = .Cells(Rows.Count, &quot;A&quot;).End(xlUp).Row
      Set rng = .Range(&quot;A1:Z&quot; &amp; lRow)
      With rng
          .AutoFilter Field:=23, Criteria1:=UserForm1.ComboBoxmonth.Text
          .AutoFilter Field:=24, Criteria1:=UserForm1.ComboBoxyear.Text
          
  
      End With
      
      On Error Resume Next
  
      TextBox1 = Application.WorksheetFunction.Sum(.Range(&quot;I2:I&quot; &amp; lRow).SpecialCells(xlCellTypeVisible))
      
      TextBox2 = Application.WorksheetFunction.Sum(.Range(&quot;K2:K&quot; &amp; lRow).SpecialCells(xlCellTypeVisible))
      
      TextBox3 = Application.WorksheetFunction.Sum(.Range(&quot;L2:L&quot; &amp; lRow).SpecialCells(xlCellTypeVisible))
      
  End With 
  End Sub
  </code></pre>