i like when i select any value in ComboBox 1 and ComboBox 4 than rate is shown in only TextBox 1
if when select any value in ComboBox 2 and ComboBox 5 than rate is shown in only TextBox 2
if when select any value in ComboBox 3 and ComboBox 6 than rate is shown in only TextBox 3
but in my macro when select any value in ComboBox 1 and ComboBox 4 than rate is shown in 3 TextBox
>>> use code - tags as You ( delta ) have informed many time <<<
i attache the sample file
if when select any value in ComboBox 2 and ComboBox 5 than rate is shown in only TextBox 2
if when select any value in ComboBox 3 and ComboBox 6 than rate is shown in only TextBox 3
but in my macro when select any value in ComboBox 1 and ComboBox 4 than rate is shown in 3 TextBox
>>> use code - tags as You ( delta ) have informed many time <<<
Code:
Dim i As Integer 'cover type combox
Dim x As Integer ' center name combox
Dim k As Integer ' amount combox
On Error Resume Next
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
For i = 1 To 3
For x = 4 To 6
For k = 1 To 3
Me.Controls("TextBox" & k).Value = Application.WorksheetFunction.Index(Sheet2.Range("A1:E8"), Application.WorksheetFunction.Match(Me.Controls("ComboBox" & i), Sheet2.Range("A1:A8"), 0), Application.WorksheetFunction.Match(Me.Controls("ComboBox" & x), Sheet2.Range("A1:E1"), 0))
Next
Next
Next
i attache the sample file
Attachments
Last edited by a moderator: