Hi all,
In a psych experiment I am using forms where my participants enter their Participant Number in a textbox (TextBoxSubjectNumber, which saves to cell A2) then complete some psychological questions which have 5 choices (Strongly disagree, disagree, neutral, agree and strongly agree). Each choice has an OptionBox and each is given a score 1-5. The score saves in one row (one participant per row). This code below works well.
However the participants do the experiment over two days, and there are more questions to answer. I want the answer scores to be saved in the same row.
How can I have subsequent data saved in a row which coincides with the participant number? So instead of saving to Range("B2"), it saves to something like ("B,TextBoxSubjectNumber.text")
Current code:
'enter your participant number
Private Sub TextBoxSubjectNumber_AfterUpdate()
Sheets("IndDiff").Range("A2").Value = TextBoxSubjectNumber.Text
End Sub
Private Sub OptionBox11_Click()
Sheets("IndDiff").Range("B2").Value = "1"
End Sub
Private Sub OptionBox12_Click()
Sheets("IndDiff").Range("B2").Value = "2"
End Sub
Private Sub OptionBox13_Click()
Sheets("IndDiff").Range("B2").Value = "3"
End Sub
Private Sub OptionBox14_Click()
Sheets("IndDiff").Range("B2").Value = "4"
End Sub
Private Sub OptionBox15_Click()
Sheets("IndDiff").Range("B2").Value = "5"
End Sub
In a psych experiment I am using forms where my participants enter their Participant Number in a textbox (TextBoxSubjectNumber, which saves to cell A2) then complete some psychological questions which have 5 choices (Strongly disagree, disagree, neutral, agree and strongly agree). Each choice has an OptionBox and each is given a score 1-5. The score saves in one row (one participant per row). This code below works well.
However the participants do the experiment over two days, and there are more questions to answer. I want the answer scores to be saved in the same row.
How can I have subsequent data saved in a row which coincides with the participant number? So instead of saving to Range("B2"), it saves to something like ("B,TextBoxSubjectNumber.text")
Current code:
'enter your participant number
Private Sub TextBoxSubjectNumber_AfterUpdate()
Sheets("IndDiff").Range("A2").Value = TextBoxSubjectNumber.Text
End Sub
Private Sub OptionBox11_Click()
Sheets("IndDiff").Range("B2").Value = "1"
End Sub
Private Sub OptionBox12_Click()
Sheets("IndDiff").Range("B2").Value = "2"
End Sub
Private Sub OptionBox13_Click()
Sheets("IndDiff").Range("B2").Value = "3"
End Sub
Private Sub OptionBox14_Click()
Sheets("IndDiff").Range("B2").Value = "4"
End Sub
Private Sub OptionBox15_Click()
Sheets("IndDiff").Range("B2").Value = "5"
End Sub