If there are only three sheets visible, the following should work
Sub SaveSheetsAsPDF()Dim xlBook As Workbook
Dim xlSheet As Worksheet
Dim sName As String
Dim i As Integer
Const sPath As String = "C:\Path\" 'the path to save the PDFs
On Error Resume Next
Set xlBook = ActiveWorkbook
Application.DisplayAlerts = False
For i = 1 To xlBook.Sheets.Count
Set xlSheet = xlBook.Sheets(i)
If xlSheet.Visible = xlSheetVisible Then
sName = xlSheet.Cells(1, 1)
If Not Right(LCase(sName), 4) = ".pdf" Then
sName = sName & ".pdf"
End If
sName = FileNameUnique(sPath, sName, "pdf")
xlSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:=sPath & sName, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End If
Next i
lbl_Exit:
Set xlBook = Nothing
Set xlSheet = Nothing
Exit Sub
End Sub
Private Function FileNameUnique(strPath As String, _
strFileName As String, _
strExtension As String) As String
'Graham Mayor - http://www.gmayor.com - Last updated - 22 Jun 2018
'strPath is the path in which the file is to be saved
'strFilename is the filename to check
'strextension is the extension of the filename to check
Dim lng_F As Long
Dim lng_Name As Long
Dim FSO As Object
Set FSO = CreateObject("Scripting.FileSystemObject")
strExtension = Replace(strExtension, Chr(46), "")
lng_F = 1
lng_Name = Len(strFileName) - (Len(strExtension) + 1)
strFileName = Left(strFileName, lng_Name)
'If the filename exists, add or increment a number to the filename
'and keep checking until a unique name is found
Do While FSO.FileExists(strPath & strFileName & Chr(46) & strExtension) = True
strFileName = Left(strFileName, lng_Name) & "(" & lng_F & ")"
lng_F = lng_F + 1
Loop
'Reassemble the filename
FileNameUnique = strFileName & Chr(46) & strExtension
lbl_Exit:
Set FSO = Nothing
Exit Function
End Function