Dear all,
Thank you very much for having this forums and help.
I am trying to create a spreadsheet which starts with a user form of which i can input a number into a textbox. On clicking a button in the user form, this number will correspond to a certain row number within a separate text file, select and copy that entire row and print it on excel.
I am very new to VBA and would appreciate if someone could give me a hand with this, i have attached the excel file for reference. thanks in advance!
My current code (which doesn't work) to copy off the spreadsheet is something like this:
Private Sub CommandButton1_Click()
Sheets("Userform").Range("A3") = TextBox1.Value
Dim r As Integer
r = Range("A1").Value
Cells(r, 1).EntireRow.Select
'Selection.Copy
'Cells(1, 1).Select
'ActiveSheet.Paste
'Application.CutCopyMode = False
End Sub
Bookmarks