Home What is the VBA formula to copy and paste the Output from a User Form into multiple rows
Reply: 0

What is the VBA formula to copy and paste the Output from a User Form into multiple rows

user921
1#
user921 Published in April 20, 2018, 10:50 am

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.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.38175 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO