UserForm data to cell help...

wisemank

Board Regular
Joined
Jun 21, 2010
Messages
129
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
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top