I have written the below code and it all works bar one bit! The range on the form is I10:R12, and when I put this in, rather than a single cell, it does not like merged cellls. (At present I have just left this in the code as I10). When I run it, this stops as it doesnt like transferring the data from cell C8:d8 on the checks sheet, to the I10:R12 cell on the form page. Due to other information on both pages, I cannot change either cell size.
Sub Macro3()
'
' Macro3 Macro
'
response = MsgBox("Are you sure you wish to print ALL records?", vbYesNo)
If response = vbNo Then
MsgBox ("No worries, I will exit then without printing!")
Exit Sub
End If
Dim lr As Long, i As Long
With Sheets("Checks")
lr = .Cells(Rows.Count, "C").End(xlUp).Row
For i = 8 To lr
If .Cells(i, "C") <> "" Then
.Cells(i, "C").Copy Sheets("Form").Range("I10")
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End If
Next
End With
End Sub
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. I also recommend using indentation to show the structure. --6StringJazzer
Bookmarks