Hi I am making a classroom Attendance Tracker on Excel 2013.
I am using VBA to make a userform to enter Data.
I currently, I am able to code the userform to enter data onto the next available row of my active worksheet. However, I want a Checkbox, that when checked, will also enter the data onto the next available row of a second worksheet. I don't know how to code for that.
Here is what I have so far:
Private Sub cmdAdd_Click()
Dim i As Integer
Range("AI6").Select
i = 1
Do Until ActiveCell.Value = Empty
ActiveCell.Offset(1, 0).Select 'move down 1 row
Loop
'Populate the data values into the 'current' worksheet.
ActiveCell.Offset(0, 0).Value = Me.txtDate.Text 'set col B
ActiveCell.Offset(0, 1).Value = Me.cboOccurence.Text 'set col C
ActiveCell.Offset(0, 2).Value = Me.cboReason.Text 'set col D
If CheckBox1.Value = True Then
WHERE DO I GO FROM HERE ? If Checkbox1 is true, then I want to enter the same data onto another worksheet called "Admissions"
I am using VBA to make a userform to enter Data.
I currently, I am able to code the userform to enter data onto the next available row of my active worksheet. However, I want a Checkbox, that when checked, will also enter the data onto the next available row of a second worksheet. I don't know how to code for that.
Here is what I have so far:
Private Sub cmdAdd_Click()
Dim i As Integer
Range("AI6").Select
i = 1
Do Until ActiveCell.Value = Empty
ActiveCell.Offset(1, 0).Select 'move down 1 row
Loop
'Populate the data values into the 'current' worksheet.
ActiveCell.Offset(0, 0).Value = Me.txtDate.Text 'set col B
ActiveCell.Offset(0, 1).Value = Me.cboOccurence.Text 'set col C
ActiveCell.Offset(0, 2).Value = Me.cboReason.Text 'set col D
If CheckBox1.Value = True Then
WHERE DO I GO FROM HERE ? If Checkbox1 is true, then I want to enter the same data onto another worksheet called "Admissions"