View Single Post
 
Old 09-06-2014, 10:50 AM
excelledsoftware excelledsoftware is offline Windows 7 64bit Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

Yup pretty easily. How about if you put a 1 or an x in column B next to the name. The code would now be this.
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
    If nws.Range("B" & CheckRow).Value <> "" Then
      cws.Range("B42").Value = nws.Range("A" & CheckRow).Value
      cws.PrintOut  'You can set specific printer properties with a ( after Printout
    End If
  Next CheckRow

End Sub
Reply With Quote