Try this
Option Explicit
Sub AutoShape1_Click()
Dim rCl As Range
Dim rRng As Range
With Sheets("Data")
Set rRng = .Range(.Cells(2, 1), .Cells(.Rows.Count, 1).End(xlUp))
For Each rCl In rRng
With Sheets("Form")
.Cells(6, 3).Value = rCl.Value
.PrintPreview
'.PrintOut '<- use when finished testing
End With
Next rCl
End With
End Sub
Copy the Excel VBA code
Select the workbook in which you want to store the Excel VBA code
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
Choose Insert | Module
Where the cursor is flashing, choose Edit | Paste
To run the Excel VBA code:
Choose Tools | Macro | Macros
Select a macro in the list, and click the Run button
Alternatively add a button to the form
Bookmarks