Hi,
I have a UserForm with some combo boxes, text boxes and radio buttons. I need to change the location of the data in the textboxes based on the selection from ComboBox1. On the change of ComboBox1 I need to index a column to next. Value of A7 = column BD, Value of A8 = BE etc... Not sure how to do this...
Below is some of my code:
Private Sub UserForm_Initialize()
Me.ComboBox1.List = ActiveSheet.Range("a7:a15").Value
End Sub
Private Sub ComboBox1_Change()
Me.ComboBox1.List = ActiveSheet.Range("a7:a15").Value
End Sub
Private Sub OptionButton1_Click()
ActiveSheet.Range("BD7").Value = "Nitrogen"
End Sub
Private Sub OptionButton2_Click()
ActiveSheet.Range("BD7").Value = "Co2"
End Sub
Private Sub OptionButton3_Click()
ActiveSheet.Range("BD7").Value = "Compressed Air"
End Sub
Private Sub CommandButton1_Click()
ActiveSheet.Range("bd8").Value = TextBox10.Value 'Gas Entry
ActiveSheet.Range("bd9").Value = TextBox11.Value 'Periphery Entry
ActiveSheet.Range("bd11").Value = TextBox12.Value 'Feature Entry
ActiveSheet.Range("bd10").Value = TextBox13.Value '# Cuts Entry
ActiveSheet.Range("bd12").Value = TextBox6.Value '# Stand Off Entry
ActiveSheet.Range("bd13").Value = TextBox7.Value '% Single Plane Entry
ActiveSheet.Range("bd14").Value = TextBox8.Value '% Dual Plane Entry
ActiveSheet.Range("bd15").Value = TextBox9.Value '% Triple Plane Entry
ActiveSheet.Range("bd16").Value = ComboBox2.Value '% Rotation Effect
ActiveSheet.Range("bd17").Value = ComboBox3.Value 'Region
Unload Me
End Sub
I have a UserForm with some combo boxes, text boxes and radio buttons. I need to change the location of the data in the textboxes based on the selection from ComboBox1. On the change of ComboBox1 I need to index a column to next. Value of A7 = column BD, Value of A8 = BE etc... Not sure how to do this...
Below is some of my code:
Private Sub UserForm_Initialize()
Me.ComboBox1.List = ActiveSheet.Range("a7:a15").Value
End Sub
Private Sub ComboBox1_Change()
Me.ComboBox1.List = ActiveSheet.Range("a7:a15").Value
End Sub
Private Sub OptionButton1_Click()
ActiveSheet.Range("BD7").Value = "Nitrogen"
End Sub
Private Sub OptionButton2_Click()
ActiveSheet.Range("BD7").Value = "Co2"
End Sub
Private Sub OptionButton3_Click()
ActiveSheet.Range("BD7").Value = "Compressed Air"
End Sub
Private Sub CommandButton1_Click()
ActiveSheet.Range("bd8").Value = TextBox10.Value 'Gas Entry
ActiveSheet.Range("bd9").Value = TextBox11.Value 'Periphery Entry
ActiveSheet.Range("bd11").Value = TextBox12.Value 'Feature Entry
ActiveSheet.Range("bd10").Value = TextBox13.Value '# Cuts Entry
ActiveSheet.Range("bd12").Value = TextBox6.Value '# Stand Off Entry
ActiveSheet.Range("bd13").Value = TextBox7.Value '% Single Plane Entry
ActiveSheet.Range("bd14").Value = TextBox8.Value '% Dual Plane Entry
ActiveSheet.Range("bd15").Value = TextBox9.Value '% Triple Plane Entry
ActiveSheet.Range("bd16").Value = ComboBox2.Value '% Rotation Effect
ActiveSheet.Range("bd17").Value = ComboBox3.Value 'Region
Unload Me
End Sub