Hej, Du kan sandsynligvis bruge følgende modificerede VBA-kode.
Sub Convert_Excel_2_PDF()
Dim sFilsti As String
With Sheets(3)
sFilsti = ActiveWorkbook.Path & Application.PathSeparator & Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) & "pdf"
.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=sFilsti, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End With
End Sub
'Kilde:
http://ilyaskazi.com/2010/10/convert-your-excel-sheet-to-pdf-using-vba/VH.
GrN.dk