I need som Help with this Formula
Nearly everything works in this formula but Not the line in Red
if i Change the Line to this Then it WorksPrivate Sub ComboBox1_Change() If ComboBox1.ListIndex = -1 Or ComboBox2.ListIndex = -1 Then Exit Sub For j = 1 To 3 Me("TextBox" & j) = ComboBox2.Column(j + 3 * ComboBox1.ListIndex) Next End Sub Private Sub ComboBox2_Change() M_calc End Sub Private Sub TextBox1_Change() M_Box 1 End Sub Private Sub TextBox2_Change() M_Box 2 End Sub Private Sub TextBox3_Change() M_Box 3 End Sub Sub M_Box(Y) ComboBox2.Column(Y + 3 * ComboBox1.ListIndex) = Me("TextBox" & Y) M_calc End Sub Sub M_calc() ReDim sp(6) sq = sp With ComboBox2 For j = 1 To 19 Step 3 c00 = c00 + Val(.Column(j + 0)) sp(j \ 3) = Val(.Column(j + 1)) sq(j \ 3) = Val(.Column(j + 2)) Next .Column(22) = c00 .Column(23) = Application.Max(sp) .Column(24) = Application.Min(sq) Frame1.Caption = Space(2) & .Column(22) & Space(14) & .Column(23) & Space(10) & .Column(24) End With End Sub Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) Ark1.Cells(1).CurrentRegion.Offset(2).Value = ComboBox2.List End Subbut That is Not what I want.Column(24) = Application.Max(sq)
Link to my File https://www.dropbox.com/s/y6h6hbtsxd...good.xlsm?dl=0




Reply With Quote