Need a bit more help please.
I have the following code on the command button to insert data on a worksheet. After the data is inserted I then want it to open UserForm2 and close Userform1. Not sure what code I need and where to enter it.
Private Sub CommandButton2_Click()
If txtdate.Value = "" Or txtchecker.Value = "" Then
MsgBox ("Please complete Date & Checker Name")
Else
Dim LastRow As Object
Set LastRow = Sheet3.Range("a65536").End(xlUp)
LastRow.Offset(1, 0).Value = txtdate.Text
LastRow.Offset(1, 1).Value = txtchecker.Text
LastRow.Offset(1, 2).Value = strRapid
ActiveWorkbook.Save
MsgBox "Written to worksheet."
End Sub
Bookmarks