View Single Post
 
Old 09-06-2014, 09:47 AM
DaZ DaZ is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Sep 2014
Location: Staffordshire England
Posts: 5
DaZ is on a distinguished road
Default

This worked great thank you

Just 1 more thing is it possible to list all names and add a filter so I can just filter out the names I need to print?

Thanks again much appreciated


Quote:
Originally Posted by excelledsoftware View Post
No problem,

With a code that is going to automatically print out 29+ reports you will want to tap through it with F8 while you see how and if it works.

Give this a try and let us know how it works.

Code:
Option Explicit
Sub ChangeNameThenPrint()
  Dim wb As Workbook, cws As Worksheet, nws As Worksheet
  Dim CheckRow As Integer, TotalNames As Integer

  Set wb = ThisWorkbook
  Set cws = wb.Worksheets("Certificate")
  Set nws = wb.Worksheets("Names")

  TotalNames = nws.Range("A50000").End(xlUp).Row
    
  For CheckRow = 1 To TotalNames
    cws.Range("B42").Value = nws.Range("A" & CheckRow).Value
    cws.PrintOut  'You can set specific printer properties with a ( after Printout
  Next CheckRow

End Sub
Reply With Quote