Public Sub ymstoredata()
q = 1
Range("a2") = Me.TextBox1.Value
Range("b2") = Me.TextBox2.Value
End Sub
Private Sub CommandButton1_Click()
End Sub
Public Sub UserForm_Click()
Do While q = 1
q = 1
ymstoredata
qstn = InputBox(prompt:="Add new data?")
If qstn = y Then
ymstoredata
Else
q = 2
Unload UserForm1
End If
Loop
End Sub
The code is suposed, to take the values from the form and store it in the sheet and then loop through and ask the user if it wants to add another record and if question )qstn = y (yes) then loop and get new data to store in sheet
above code is not working ,can an expert please explain to me why it doesnt work and what i must do to make it work?
Thank you very much i greatly appreaciate your help!!!!!!!!!!!
also i will need simple code to add a new record underneath the previous one
Bookmarks