I have created a userform and i am able get the form to transfer data in the sheet i require.
however i am unable to move to the next row once i've used the first row
I have 4 text boxes 1 Combobox and 1 list box
Please help me as i am very new to VBA and cant seem to get this right.
Below is my Code
however i am unable to move to the next row once i've used the first row
I have 4 text boxes 1 Combobox and 1 list box
Please help me as i am very new to VBA and cant seem to get this right.
Below is my Code
VBA Code:
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub CMDsubmit_Click()
Sheet2.Activate
Range("a2").Value = TextBox1.Value
Range("b2").Value = CBcollector.Value
Range("c2").Value = ListBox1.Value
Range("d2").Value = TextBox3.Value
Range("E2").Value = TextBox2.Value
End Sub
Private Sub CommandButton1_Click()
Dim z As Control
For Each z In UserForm1.Controls
If TypeName(z) = "TextBox" Then
z.Value = ""
End If
Next z
End Sub
Private Sub TextBox1_AfterUpdate()
If IsDate(Me.TextBox1.Text) Then
Me.TextBox1.Text = Format(Me.TextBox1.Text, "dd/mm/yyyy")
End If
End Sub