Hi,
I'm using below code in a userform to update data in specific columns.
Currently the macro is only updating data once, every time it is run.
I'm looking for an addition to the above code which will update data every time the code is run
Kindly assist in any way possible
I'm using below code in a userform to update data in specific columns.
Code:
Const F = "dd-mm-yy hh:mm"
Private Sub CommandButton1_Click()
N% = Val(TextBox11.Text)
If N < 1 Then TextBox10.SetFocus: Beep: Exit Sub
V = [{8,11,12,13,16,19,20,21,22,23}]
r& = Sheet2.Cells(Sheet2.Rows.Count, V(1)).End(xlUp)(2).Row
For c% = 1 To UBound(V)
Sheet2.Cells(r, V(c)).Resize(N).Value = Me.Controls("TextBox" & c).Text
Me.Controls("TextBox" & c).Text = ""
Next
UserForm_Initialize
End Sub
Private Sub TextBox2_Enter()
TextBox2.Text = Format$(Now, F)
End Sub
Private Sub UserForm_Initialize()
TextBox3.Text = Format$(Now, F)
TextBox11.Text = "1"
End Sub
Private Sub TextBox4_Enter()
TextBox4.Text = Format$(Now, F)
End Sub
Currently the macro is only updating data once, every time it is run.
I'm looking for an addition to the above code which will update data every time the code is run
Kindly assist in any way possible