ashanker
02-01-2017, 03:20 PM
Hi I am currently using this macro to save the active worksheet as a pdf using a cell value as the file name. I have 8 different workbooks and some with up to 60 work sheets. I am wanting to get the macro to loop from my active worksheet to the last one in the work book. Any help is very appreciated.
Sub PDF()
Dim SaveAsStr As String
SaveAsStr = ActiveWorkbook.Path & "\" & ActiveSheet.Range("l8").Value
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=SaveAsStr & ".pdf", _
OpenAfterPublish:=False
End Sub
Sub PDF()
Dim SaveAsStr As String
SaveAsStr = ActiveWorkbook.Path & "\" & ActiveSheet.Range("l8").Value
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=SaveAsStr & ".pdf", _
OpenAfterPublish:=False
End Sub