C
Carrie_Loos via OfficeKB.com
Here is the code I got from the Microsoft site for "How to Use a UserForm for
Entering Data" But I cannot get the code to work. I get a compile error, User
Defined Type not Defined. Seems to be having trouble with the oject and I
don't know why. Can anyone see it?
Private Sub CommandButton1_Click()
Dim LastRow As Object
Set LastRow = Keys.Range("b65530").End(x1Up)
LastRow.Offset(1, 0).Value = TestBox1.Text
MsgBox "Record written to Training List"
response = MsgBox("Do you want to enter another record?", vbYesNo)
If response = vbYes Then
TextBox1.Text = " "
TextBox1.SetFocus
Else
Unload Me
End If
End Sub
Entering Data" But I cannot get the code to work. I get a compile error, User
Defined Type not Defined. Seems to be having trouble with the oject and I
don't know why. Can anyone see it?
Private Sub CommandButton1_Click()
Dim LastRow As Object
Set LastRow = Keys.Range("b65530").End(x1Up)
LastRow.Offset(1, 0).Value = TestBox1.Text
MsgBox "Record written to Training List"
response = MsgBox("Do you want to enter another record?", vbYesNo)
If response = vbYes Then
TextBox1.Text = " "
TextBox1.SetFocus
Else
Unload Me
End If
End Sub