A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Does this do what you want?
Private Sub PDF()
Dim wbA As Workbook
Dim wsB As Worksheet
Dim strName As String
Dim strPath As String
Dim strFile As String
Dim strPathFile As String
Dim rng As String
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In ActiveWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
On Error GoTo errHandler
Set wbA = ActiveWorkbook
Set wsB = Worksheets("Lookup Table")
wsB.Range("B230").Value = 0
Do
wsB.Range("B230").Value = wsB.Range("B230").Value + 1
strName = wsB.Range("C230").Value
strPath = "C:\Users\Elizabeth\Desktop\Files"
strFile = strName & ".pdf"
strPathFile = strPath & strFile
Worksheets(Array("Summary", "Comments")).ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=strPathFile, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Loop While wsB.Range("B230").Value < 227
wsB.Range("B230").Value = 0
exitHandler:
Application.ScreenUpdating = True
Exit Sub
errHandler:
MsgBox "Could not create PDF file"
Resume exitHandler
End Sub