I have created a User Form in Excel that follows the following VBA code:
Private Sub CommandButton1_Click()
If TextBox1.Value = "" Then
If MsgBox("Form is not complete. Continue?", vbQuestion + vbYesNo) <> vbYes Then
Exit Sub
End If
End If
ActiveCell = TextBox1.Value
ActiveCell.Offset(20, 0).Select
Call resetForm
End Sub
Sub resetForm()
TextBox1.Value = ""
UserForm1.TextBox1.SetFocus
End Sub
This VBA code provides me the result generated in the User Form in the active cell of the WorkSheet.
I want to copy and paste this result into 18 rows below and then the active cell should be offset to the row below this cell.
The idea being if a User generates another result through the User Form (command button) will copy and paste this result 18 rows below and then the active cell should be offset to the row below this cell.
No comments:
Post a Comment