Hi Everyone
I have a form that has a combobox for choosing the subject, I use "labels" to show that data and a command to regist it in the worksheet
It turns out that the last line is not identified, so the information to be added is superimposed on the previously registered information. How to overcome?
I enclose an excerpt of code.
Thanks you.
I have a form that has a combobox for choosing the subject, I use "labels" to show that data and a command to regist it in the worksheet
It turns out that the last line is not identified, so the information to be added is superimposed on the previously registered information. How to overcome?
I enclose an excerpt of code.
Thanks you.
VBA Code:
Private Sub CommandButton2_Click()
Dim wks As Worksheet
Dim additem As Range
Dim rng As Range
Set wks = Sheet5
Set rng = Worksheets("sheet5").Cells(Rows.Count, "a").End(xlUp).Offset(1, 0)
rng.Offset(0, 1) = Label1.Caption
rng.Offset(0, 2) = Label2.Caption
rng.Offset(0, 3) = Label3.Caption
.....