raccoon588
Board Regular
- Joined
- Aug 5, 2016
- Messages
- 118
i have a user form with three frames in it "full day", "first half", "second half". in each frame there are 7 check boxes, each check boxs represents a day. a user should be able to come in and check of which days they want and depending on which frame they choose it represent a full or first half or second half of the day.id like a way that if the check box is true i can dump the date and full/first/or second half into the cells of the excel sheet. then have it loop through all the check boxes to see which ones are true and if true return the data to the excel sheet. the sheet is just a running log of the dates they put in for, so i don't want it to override any previous data listed.
this is typically the code i use to dump data, can i make adjustments to this?
this is typically the code i use to dump data, can i make adjustments to this?
Code:
Dim erow As Long
erow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Cells(erow, 1).Value = TxtDate.Value
Cells(erow, 2).Value = CmbShift.Value
Cells(erow, 3).Value = TxtSig.Value * 8
Cells(erow, 4).Value = TxtLB.Value * 8
Cells(erow, 5).Value = TxtHB.Value * 8
Cells(erow, 6).Value = TxtP55X.Value * 8
Cells(erow, 7).Value = TxtJoule.Value * 8
Cells(erow, 8).Value = TxtC520.Value * 8
Cells(erow, 9).Value = TxtSMT.Value * 8
Cells(erow, 10).Value = Date
Cells(erow, 11).Value = Time