S sunnyp Member May 22, 2012 #1 How to program in user form that particular text box entry will go the particular cell.
N NARAYANK991 Excel Ninja May 22, 2012 #2 Hi , Just type in the cell address in the ControlSource property. For example , if in the ControlSource property , you have A1 , then any data entered in the text box will go into cell A1 on the worksheet. Narayan
Hi , Just type in the cell address in the ControlSource property. For example , if in the ControlSource property , you have A1 , then any data entered in the text box will go into cell A1 on the worksheet. Narayan
Luke M Excel Ninja Staff member May 22, 2012 #3 Store the user's input to a variable, and then set the value of a cell to that variable. [pre] Code: Sub UserInput() Dim xAnswer As String xAnswer = InputBox("What is the answer?", "Question") Range("A2") = xAnswer End Sub [/pre] It's a similar method to get the input from a user form.
Store the user's input to a variable, and then set the value of a cell to that variable. [pre] Code: Sub UserInput() Dim xAnswer As String xAnswer = InputBox("What is the answer?", "Question") Range("A2") = xAnswer End Sub [/pre] It's a similar method to get the input from a user form.
S sunnyp Member May 23, 2012 #4 Does not work i will give you an example suppose i have user form Name ------ submit (coomand) when i put in the text box and submit that should submit in the suppose in row 2 column 3. How do i do that.
Does not work i will give you an example suppose i have user form Name ------ submit (coomand) when i put in the text box and submit that should submit in the suppose in row 2 column 3. How do i do that.
Luke M Excel Ninja Staff member May 23, 2012 #5 I'm afraid I don't understand what you just said. =( Are you really using an UserForm, or do you just need an InputBox?
I'm afraid I don't understand what you just said. =( Are you really using an UserForm, or do you just need an InputBox?
Luke M Excel Ninja Staff member May 23, 2012 #7 Under the code for the command button on the user form, you'll have something like this: [pre] Code: Private Sub CommandButton1_Click() Range("C2").Value = Me.TextBox1.Value 'Change this to the correct textbox name End Sub [/pre]
Under the code for the command button on the user form, you'll have something like this: [pre] Code: Private Sub CommandButton1_Click() Range("C2").Value = Me.TextBox1.Value 'Change this to the correct textbox name End Sub [/pre]