Getting data from your form to your spreadsheet
Last week we had a play with creating our own customised forms, with text boxes, comboboxes, labels and other options... but one question that many people asked was "How do I get the info from the form and into the spreadsheet?" That's the first thing we'll see this week!
Open up your StudentResults Spreadsheet that we started last week and:
- Go into the vba editor
- Edit your userform (it should be called frmStudentDetails or something similar)
- Double-click on the OK button to add a click-event for your OK button,
- Cells(1,1).Select
- ActiveCell = txtFirstName 'Or whatever your field is called
- ActiveCell.Offset(1,0) = txtLastName
Now we've got one remaining problem... our data is getting from our form to our spreadsheet, but it always going into the same row... how are we going to solve this?
0 Comments:
Post a Comment
<< Home