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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,215,064
Messages
6,122,937
Members
449,094
Latest member
teemeren

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