I appraciate that the syntax in the below code is probably incorrect, however, I was wondering if there is a simpler way to create code to popualte multiple cells with a value from a range oc cells.
Typically I will be pulling values from different ranges for different values in CBOTest1
Example
As there will be multiple values in cboTest1 I am looking for to reduce the number of lines of code
VBA Code:
If cboTest1.Value = "Test 1" Then
texttBox1.Value - Sheets("Sheet1").Range(B2)
texttBox2.Value - Sheets("Sheet1").Range(B3)
texttBox3.Value - Sheets("Sheet1").Range(B4)
texttBox4.Value - Sheets("Sheet1").Range(B5)
texttBox5.Value - Sheets("Sheet1").Range(B6)
End If
Typically I will be pulling values from different ranges for different values in CBOTest1
Example
VBA Code:
If cboTest1.Value = "Test 2" Then
texttBox1.Value - Sheets("Sheet1").Range(D2)
texttBox2.Value - Sheets("Sheet1").Range(D3)
texttBox3.Value - Sheets("Sheet1").Range(D4)
texttBox4.Value - Sheets("Sheet1").Range(D5)
texttBox5.Value - Sheets("Sheet1").Range(D6)
End If
As there will be multiple values in cboTest1 I am looking for to reduce the number of lines of code