Hi. This is my first post to this forum. I have a user form that has 6 text boxes. I know that the values are being assigned to variables correctly because I have them all listed in a message box (one below the other) after the user hits OK after entering the sixth value. However, when I then try to write those 6 values to a column in Excel, only the first value is written, and this is always the value in the first 'Activecell.value.....' statement in the routine. The problem is that I want all 6 values listed, in cells E1:E6. I am pasting the code below that is associated with the OK key at the bottom of the user form. I assume I am making a mistake here that will be obvious to some or most of you.
Code
Public Sub OK_Click()
MsgBox Mycell & vbNewLine & _ 'displays values of variables from text boxes in user form
Condition_name & vbNewLine & _
MyNum & vbNewLine & _
trial_start & vbNewLine & _
Baseline_num & vbNewLine & _
Myvalue
Range("E1").Value = UserForm1.User_inputs.Value 'should write input values to text boxes to cells in Excel
Range("E2").Value = UserForm1.Sheet_name.Value
Range("E3").Value = UserForm1.Trial_num.Value
Range("E4").Value = UserForm1.Start_time.Value
Range("E5").Value = UserForm1.Baseline_cell_num.Value
Range("E6").Value = UserForm1.OSR_trials.Value
End Sub
Display More