I have a spreadsheet which records dates and hours gained during a month / year, then it records these dates and hours on a second sheet. I am having an issue with it not recording more than 2 lines and seems to overwrite the second line constantly.
I would also like to somehow get an up-to-date total showing (Balance to Date). I can get it working once, however when I then press the Transfer button, it changes the Balance to Date back to Toil to Date total.
Private Sub CommandButton1_Click()
Dim DateToilUsed As String, AmountTOILUsed As String
Worksheets("TOIL Tracker").Select
DateToilUsed = Range("NL9")
AmountTOILUsed = Range("NM9")
Worksheets("TOIL Usage").Select
Worksheets("TOIL Usage").Range("B3").Select
If Worksheets("TOIL Usage").Range("B3").Offset(1, 0) <> "" Then
Worksheets("TOIL Usage").Range("B3").End(xlDown).Select
End If
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = DateToilUsed
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = AmountTOILUsed
Worksheets("TOIL Tracker").Select
Worksheets("TOIL Tracker").Range("NL9:NM9").ClearContents
End Sub
I would also like to somehow get an up-to-date total showing (Balance to Date). I can get it working once, however when I then press the Transfer button, it changes the Balance to Date back to Toil to Date total.
Private Sub CommandButton1_Click()
Dim DateToilUsed As String, AmountTOILUsed As String
Worksheets("TOIL Tracker").Select
DateToilUsed = Range("NL9")
AmountTOILUsed = Range("NM9")
Worksheets("TOIL Usage").Select
Worksheets("TOIL Usage").Range("B3").Select
If Worksheets("TOIL Usage").Range("B3").Offset(1, 0) <> "" Then
Worksheets("TOIL Usage").Range("B3").End(xlDown).Select
End If
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = DateToilUsed
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = AmountTOILUsed
Worksheets("TOIL Tracker").Select
Worksheets("TOIL Tracker").Range("NL9:NM9").ClearContents
End Sub