I have code for writing a name and grade of a student.
When I close EXCEL and reopen it the code writes entries I have already written.
I need when I open Excel again, it will keep writing where I finished.
Private Sub cmdFirst_Click()
Dim intCode As Integer
Dim bytGrade As Byte
Static bytrow As Byte
Dim bytcount As Byte
Static bytmax As Byte
Static bytmin As Byte
bytrow = 1
intCode = Val(InputBox("", ""))
bytGrade = Val(InputBox("", "))
bytrow = bytrow + 1
Cells(bytrow, "A") = intCode
Cells(bytrow, "B") = bytGrade
Loop
End Sub