Guzman
New Member
Hi !
Hi ! Maybe you can help me with this.
I'm trying to:
Any idea?
THANKS.
Hi ! Maybe you can help me with this.
I'm trying to:
- loop through a folder of excel files
- export as PDF sheets 2 to 5 of each file
- name each PDF with the value of cell A1 in sheet 1 of each file
Code:
Sub export_PDF_Test()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
' Path
Folder = ThisWorkbook.Path & “\”
File = Dir(ruta & “*.xlsx”)
PathFile = ruta & archivo
' Loop through folder
Do While File <> ""
Set l2 = Workbooks.Open(PathFile)
l2.Sheets(Array(2, 3, 4, 5)).Select
' export as PDF each file, sheets (2 to 5)
*** code: to export as PDF (exportasfixedformat) ***
l2.Close True
File = Dir()
Loop
End Sub
Any idea?
THANKS.