The code below shows where i want to start placing information that I get from my form.
After the information is inputted via the button click, how do i get the next information to go into
the appropriate place?
For example, when Melissa is selected the listbox value will go to A16 and the txt value will go to B16.
If Melissa continues to be selected and I pick another listbox and txt, it needs to go to A17 and B17.
Private Sub btnAdd_Click()
If opnMelissa.Value = True Then Worksheets("Our Data").Range("A16").Value = Me.lbxNutrition.Value
If opnMelissa.Value = True Then Worksheets("Our Data").Range("B16").Value = Me.txtServings.Value
If opnDaniel.Value = True Then Worksheets("Our Data").Range("P16").Value = Me.lbxNutrition.Value
If opnDaniel.Value = True Then Worksheets("Our Data").Range("Q16").Value = Me.txtServings.Value
End Sub
After the information is inputted via the button click, how do i get the next information to go into
the appropriate place?
For example, when Melissa is selected the listbox value will go to A16 and the txt value will go to B16.
If Melissa continues to be selected and I pick another listbox and txt, it needs to go to A17 and B17.
Private Sub btnAdd_Click()
If opnMelissa.Value = True Then Worksheets("Our Data").Range("A16").Value = Me.lbxNutrition.Value
If opnMelissa.Value = True Then Worksheets("Our Data").Range("B16").Value = Me.txtServings.Value
If opnDaniel.Value = True Then Worksheets("Our Data").Range("P16").Value = Me.lbxNutrition.Value
If opnDaniel.Value = True Then Worksheets("Our Data").Range("Q16").Value = Me.txtServings.Value
End Sub